-
Notifications
You must be signed in to change notification settings - Fork 10
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
Can't ignore Rails/EnvironmentVariableAccess cop #7
Comments
This is probably a legit bug as I've never used this feature or really understand how it's implemented |
OK, could @mrbiggred possibly help? |
Hmm, it's not a todo thing. I have the same problem even after I move the lines to
|
The |
The problem is even more specific: I can't ignore the Rails/EnvironmentVariableAccess cop. Other Rails cops can be ignored from either file. I changed the subject accordingly. |
Thanks for narrowing your report. Unfortunately I was unable to replicate your issue in this commit, which adds a test of an ignore Note that the nested ignore here is two levels of indentation deep (one more than you might expect) so that the YAML parses it as a nested map and not a subsequent element in an array: ignore:
- '**/*.rb':
- Bananas/BananaBomb Your example was this: - lib/log/logger.rb:
- Style/GlobalStdStream
- Rails/EnvironmentVariableAccess Does this work? - lib/log/logger.rb:
- Style/GlobalStdStream
- Rails/EnvironmentVariableAccess |
I'm sorry to report that doesn't help in my case. I'm baffled why this one particular cop can't be ignored. I'm trying to convert a private repo from rubocop to standard, and have removed old .rubocop.yml and .rubocop_todo.yml files. Rails/EnvironmentVariableAccess is disabled by default in rubocop-rails, and so the old config and code didn't have to ignore it. I do note that I can successfully |
Yes, see CruGlobal/rails-infrastructure-canary#99 The Ruby/lint Action fails the same way it does for me locally,
|
I figured this out and it was not fun. See standardrb/standard@ed4253a for a description Released a fix in standard@1.28.4 |
Glad you figured it out @searls. |
I'm unable ignore this rule, I'm on Standard version: plugins:
- standard-rails
ignore:
- 'Rails/EnvironmentVariableAccess' |
standardrb --generate-todo
does create Rails exclusions; example:However, despite this:
The text was updated successfully, but these errors were encountered: