8000 GitHub - kLeZ/senpai: With this plugin, you will be able to attach comments to specific piece of code and/or general remarks about the entire project along with producing a simple and good-looking static html report ready to be handed. A hard fork of the stale plugin Sensei (https://github.com/SamuelCabralCruz/sensei).
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

With this plugin, you will be able to attach comments to specific piece of code and/or general remarks about the entire project along with producing a simple and good-looking static html report ready to be handed. A hard fork of the stale plugin Sensei (https://github.com/SamuelCabralCruz/sensei).

License

Notifications You must be signed in to change notification settings

kLeZ/senpai

Repository files navigation

Senpai - Your Gentle Code Reviewer

Build Version Downloads

This plugin has been developed to ease the work of software engineer courses' assistants that are in charge of going through tons of source files in order to provide feedback and advices to students. With this plugin, you will be able to attach comments to specific piece of code and/or general remarks about the entire project along with producing a simple and good-looking static html report ready to be handed.

Hard fork of the stale plugin Sensei.

List of features

Limitations

  • Report highlighting might not work if language fall of this list.
  • Line markers in the IDE might be misplaced depending on the granularity of the PSI elements.

Code Highlighting

  • We use prism in order to highlight code snippets.
  • In order to update the scripts (prism.css and prism.js), simply go to the following page.
    • Here are the options we currently use:
      • Compression: Minified version
      • Theme: Coy
      • Languages: All
      • Plugins:
        • Line Highlight
        • Line Numbers
        • Normalize whitespace
        • Toolbar
        • Copy to Clipboard Button
  • We also customize the exported stylesheet.
    • Remove the pseudo-elements on the pre tag
      pre[class*="language-"]:before,
      pre[class*="language-"]:after {
          content: '';
          z-index: -2;
          display: block;
          position: absolute;
          bottom: 0.75em;
          left: 0.18em;
          width: 40%;
          height: 20%;
          max-height: 13em;
          box-shadow: 0px 13px 8px #979797;
          -webkit-transform: rotate(-2deg);
          -moz-transform: rotate(-2deg);
          -ms-transform: rotate(-2deg);
          -o-transform: rotate(-2deg);
          transform: rotate(-2deg);
      }
    • Remove line highlight gradient
      .line-highlight {
          background: linear-gradient(to right, hsla(201, 100%, 50%, .1) 70%, hsla(201, 100%, 50%, 0));
      }
    • Modify the line highlighting color
      .line-highlight {
          ...
          background: hsla(201, 100%, 50%, .08);
          ...
      }
      
      .line-highlight:before,
      .line-highlight[data-end]:after {
          ...
          background-color: hsla(201, 100%, 50%, 1);
          color: hsl(201, 100%, 95%);
          ...
      }
    • Remove vertical separator
      pre[class*="language-"] > code {
          ...
          border-left: 10px solid #358ccb;
          box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf;
          ...
      }
    • Remove alternate line background
      pre[class*="language-"] > code {
          ...
          background-image: linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
          background-size: 3em 3em;
          background-origin: content-box;
          background-attachment: local;
          ...
      }
    • Remove right padding
      code[class*="language"] {
          ...
          padding: 0 1em;
          ...
      }
    • Remove margin pre tag
      pre[class*="language-"] {
          ...
          margin: 0;
          ...
      }
      
      /* Margin bottom to accommodate shadow */
      :not(pre) > code[class*="language-"],
      pre[class*="language-"] {
          background-color: #fdfdfd;
          -webkit-box-sizing: border-box;
          -moz-box-sizing: border-box;
          box-sizing: border-box;
          margin-bottom: 1em;
      }
    • Modify code background color
      pre[class*="language-"] > code {
          ... 
          background-color: #ededed;
          ...
      }
    • Remove tokens background color
      .token.operator,
      .token.entity,
      .token.url,
      .token.variable {
          ...
          background: rgba(255, 255, 255, 0.5);
          ...
      }
      
      .language-css .token.string,
      .style .token.string {
          ...
          background: rgba(255, 255, 255, 0.5);
          ...
      }
    • Remove inline code related styling
      /* Inline code */
      :not(pre) > code[class*="language-"] {
          position: relative;
          padding: .2em;
          border-radius: 0.3em;
          color: #c92c2c;
          border: 1px solid rgba(0, 0, 0, 0.1);
          display: inline;
          white-space: normal;
      }
      
      :not(pre) > code[class*="language-"]:after,
      pre[class*="language-"]:after {
          right: 0.75em;
          left: auto;
          -webkit-transform: rotate(2deg);
          -moz-transform: rotate(2deg);
          -ms-transform: rotate(2deg);
          -o-transform: rotate(2deg);
          transform: rotate(2deg);
      }
    • Hide overflow code block
      code[class*="language"] {
          ...
          overflow: hidden;
      }

JQuery

In order to use JQuery, we have to download a minified version. We are currently using the version jQuery Core 3.4.1. There was a mention to include integrity and crossorigin attributes to the script tag, but we did not.

Installation

  • Using IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace > Search for "senpai" > Install Plugin

  • Manually:

    Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...


Plugin based on the IntelliJ Platform Plugin Template.

About

With this plugin, you will be able to attach comments to specific piece of code and/or general remarks about the entire project along with producing a simple and good-looking static html report ready to be handed. A hard fork of the stale plugin Sensei (https://github.com/SamuelCabralCruz/sensei).

Resources

License

Code of conduct

Stars

Watchers

Forks

Contributors 2

  •  
  •  
0