Sublime Text 3 plugin for rubocop on git diff
It runs rubocop on the git diff of the active view file and shows gutter icons and squiggly underlines on the error lines. When hovered on the gutter icon, it shows the error messages for the lines in a popup.
-
Go to the sublime text folder.
- Windows: %APPDATA%\Sublime Text 3
- OS X: ~/Library/Application Support/Sublime Text 3
- Linux: ~/.config/sublime-text-3
-
Go to packages folder
-
Run the git clone command inside the packages directory:
git clone git@github.com:arunn/RubocopDiffSublime.git "RubocopDiffSublime"
- Restart Sublime Text.
When there are other icons present in the gutter(for ex: GitGutter), RubocopDiffSublime's icons and popups may not be shown. This can be fixed if the plugin provides configuration regarding it. Add the following to the GitGutter.settings file for GitGutter plugin.
"protected_regions": [
"sublimelinter-warning-gutter-marks",
"sublimelinter-error-gutter-marks",
"bookmarks",
"rubocop_marks"
],
"enable_hover_diff_popup": false
Sam Mello for giving the best possible writeup for sublime plugin creation(https://cnpagency.com/blog/creating-sublime-text-3-plugins-part-1/)
Sublime API Reference(https://www.sublimetext.com/docs/3/api_reference.html)