-
Notifications
You must be signed in to change notification settings - Fork 33
Conversation
Thanks for the pull request. I agree that |
if @command[0].indexOf('rubocop') isnt -1 and | ||
atom.config.get('atom-lint.rubocop.rails') is true and | ||
atom.project.path? | ||
_.extend(options, { cwd: atom.project.path }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I said, we can always set the cwd
regardless whether the command is rubocop
.
Ok sounds good. Do you want me to close this PR and come back with a new one for just setting the |
No you need not. You can add further changes in the current branch, squash the commits, and |
Here we go. Will set the CWD for any linter. |
As noted above, could you remove the |
This is ready to be merged now. |
Thanks! |
Add support for Rails Cop
rubocop
needs to be ran from the project directory where the Rails app lives to work. Therefore, ifrubocop
is used then change the CWD to the project path if the Rails flag has been set.To enable this add
rails: true
to yourconfig.cson
e.g.All specs pass in Atom (0.118.0 using React Editor). Using the
rake
command one fails, but it also fails in master, hopefully a separate issue.