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

Sublime​Linter-rubocop

by SublimeLinter ST3

SublimeLinter 3 plugin for Ruby, using rubocop.

Details

Installs

  • Total 29K
  • Win 4K
  • OS X 17K
  • Linux 8K
Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6
Windows 4 1 2 5 4 0 0 9 5 6 3 1 2 5 3 4 1 3 3 1 5 4 1 3 5 1 2 1 7 3 3 2 3 1 1 2 2 1 4 1 2 4 1 4 7 8
OS X 8 20 18 25 22 7 11 22 32 26 16 20 8 10 25 27 22 27 11 2 7 18 19 24 15 23 5 4 15 23 18 31 31 11 8 20 31 27 31 35 7 9 34 28 30 40
Linux 4 14 8 10 10 3 7 3 8 13 5 8 3 4 13 7 10 9 12 3 1 6 6 13 11 12 2 8 11 17 19 11 13 3 8 11 12 16 13 16 3 6 8 14 19 13

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
        }
    }
}