SublimeLinter / SublimeLinter-rubocop

SublimeLinter 3 plugin for Ruby, using rubocop.
MIT License
159 stars 40 forks source link

Needs better documentation on how to set it up #31

Closed marko-avlijas closed 8 years ago

marko-avlijas commented 8 years ago

By default, the linter plugin looks for a config file called .rubocop.yml in the current directory and its parents. To override the config file path, you would add this to the linter settings:

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

To which file should I add this? I don't have time to SublimeLinter 200 pages manual on settings to which this document links to.

joshmfrankel commented 8 years ago

So you have two options on how to configure a rubocop config file.

  1. You can have a .rubocop.yml in the project directory (default)
  2. You can modify the Sublime Linter User Settings (Preferences->Package Settings->SublimeLinter->Settings - User) and add to the args attribute a different config file for rubocop. Useful for a global setting.
linters: {
  # other linter configurations
  ...
  "rubocop": {
    "@disable": false,
    "args": ["--config", "path/to/config.yml"],
    "excludes": []
  },
}
marko-avlijas commented 8 years ago

Thank you. I recommend you add Preferences->Package Settings->SublimeLinter->Settings - User to README to save other users time.

reconbot commented 8 years ago

Hi @marko-avlijas i understand it's frustrating to approach a new project and understand it's context. Were all volunteers here and together we improve the project as we can. This isn't any of our full time jobs and the project is free to use and improve. Would you be able to make those changes you suggested? I know it would make it much clearer for the next person stuck with your specific situation.

@joshmfrankel thank you for taking the time to answer this issue promptly

marko-avlijas commented 8 years ago

@reconbot Yes I can do that, but I've never colaborated on github before. I know how to use git. What should I do? Fork, make changes, commit, push and create pull request? Or?

reconbot commented 8 years ago

You guessed correctly =)


Francis Gulotta wizard@roborooter.com

On Wed, Jul 20, 2016 at 11:20 AM, marko-avlijas notifications@github.com wrote:

Yes I can do that, but I've never colaborated on github before. I know how to use git. What should I do? Fork, make changes, commit and create pull request? Or?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SublimeLinter/SublimeLinter-rubocop/issues/31#issuecomment-233982872, or mute the thread https://github.com/notifications/unsubscribe-auth/AABlbpe6V2pO9rMwOFvbeVJbRy5LWIrWks5qXjy3gaJpZM4JQshZ .

reconbot commented 8 years ago

Closed with #32 thanks for the addition!