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 30K
  • Win 4K
  • OS X 18K
  • Linux 9K
Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10
Windows 1 0 2 1 7 1 4 1 0 2 4 4 5 0 1 1 2 1 3 7 3 0 2 5 6 3 2 4 2 0 5 4 1 7 4 6 1 5 1 3 4 6 2 3 2 2
OS X 9 5 23 33 30 33 26 11 8 20 22 33 27 17 5 17 22 18 29 31 31 7 4 19 11 24 25 9 4 7 20 33 29 29 20 10 10 31 41 21 29 31 8 6 18 26
Linux 2 6 7 14 12 5 5 5 15 12 8 16 7 4 8 3 14 2 8 12 9 5 1 8 5 13 7 10 3 4 8 8 16 12 8 4 5 6 11 11 12 11 2 1 4 14

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