ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Sublime​Linter-rubocop

by SublimeLinter ST3 Trending

SublimeLinter 3 plugin for Ruby, using rubocop.

Details

Installs

  • Total 44K
  • Win 5K
  • Mac 26K
  • Linux 13K
Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15
Windows 3 2 1 0 5 1 0 2 2 0 1 3 0 2 7 2 4 0 2 2 0 1 0 1 0 2 0 0 0 2 2 2 2 0 4 1 2 0 1 1 0 0 1 0 1 1
Mac 19 56 9 55 10 7 18 14 4 5 3 10 17 11 11 23 1 13 8 9 7 11 12 0 21 4 9 11 10 9 6 8 15 9 4 7 9 3 5 9 9 8 8 17 3 5
Linux 7 18 7 3 4 7 8 10 4 5 2 6 4 8 7 5 3 3 2 6 8 6 9 1 5 5 7 3 10 1 2 0 4 2 2 5 6 3 5 4 7 8 8 5 8 1

Readme

Source
raw.​githubusercontent.​com

SublimeLinter-rubocop

Build Status

This linter plugin for SublimeLinter provides an interface to rubocop. It will be used with files that have the ruby, ruby on rails, rspec, betterruby, better rspec, ruby experimental or cucumber steps syntaxes.

Installation

SublimeLinter must be installed in order to use this plugin.

Please use Package Control to install the linter plugin.

Before using this plugin, you must ensure that rubocop (0.34.0 or later) is installed on your system. To install rubocop, do the following:

  1. Install Ruby.

  2. Install rubocop by typing the following in a terminal:

[sudo] gem install rubocop
  1. If you are using rvm or rbenv, ensure that they are loaded in your shell’s correct startup file. See here for more information.

In order for rubocop to be executed by SublimeLinter, you must ensure that its path is available to SublimeLinter. The docs cover troubleshooting PATH configuration.

Settings

You can configure rubocop exactly the way you would from the command line, using .rubocop.yml configuration files. For more information, see the rubocop documentation.

To override the config file path, you would add this to the Sublime Linter User Settings:

{ 
    "linters": {
        "rubocop": {
            "args": ["--config", "path/to/config.yml"]
        }
    }
}

Bundler

If you are using Bundler and would like to use the locked rubocop version (which will also allow you to use inherit_gem in rubocop.yml, in case you are inheriting from another gem in the project), you must set use_bundle_exec to true:

{ 
    "linters": {
        "rubocop": {
            "use_bundle_exec": true
        }
    }
}