-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When running rubocop on a file that .rubocop.yml excludes, have option to skip it #893
Comments
+1 on this |
Sounds reasonable. @jonas054 @yujinakayama Your thoughts? |
As I mentioned in yujinakayama/atom-lint#25, 👍 for this. |
👍 I can see a need for this feature when RuboCop is run from a tool. |
OK, so I guess we'll implement this. @yujinakayama @jonas054 Would one of you like to do it, since my personal RuboCop pipeline is full of tasks. |
Then I'll do. |
In my project's
When i run Looks like a bug, am I wrong? |
Yes you are. 😄 The |
@jonas054 Nevermind |
Because command line arguments override configuration. It's convenient to be able to inspect excluded files by naming them explicitly without having to edit the configuration. |
But it is resulting to unexpected behaviour in linters (I'm using sublime linter). I ignore |
The sublime linter should use the |
Yes, you are right. From the console it work ok, then it's linter's issue, because it won't work from sublime, thank you. |
Needs "--force-exclusion" to respect excluded files as per rubocop/rubocop#893
Needs "--force-exclusion" to respect excluded files as per rubocop/rubocop#893
My
rubocop.yml
in a Rails project has the following lines:rubocop db/
will produce no errors, as expected.rubocop db/schema.rb
does produce errors.This is not inherently bad—in fact, that's nice behavior because it lets you check things regardless of general project configuration.
But my git
pre-commit
script searches for all Ruby files currently staged for committing, and runsrubocop
on them (as opposed to also checking files that aren't staged for commit). I want to be able to enforce that because those files are excluded in configuration, skip them, even though therubocop
invocation explicitly refers to that filename. A flag for that would be nice.The text was updated successfully, but these errors were encountered: