-
Notifications
You must be signed in to change notification settings - Fork 15
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
Disable Rails/EnvironmentVariableAccess in config/initializers? #46
Comments
I hate this rule across the board (due to the fact Rails has changed the "correct" way to access ENV vars conventionally 4 times in 10 years) and am absolutely supportive of nixing it. Send a PR to disable |
Awesome. I came here with this same issue. I think this rule has never worked as intended. Rubocop-rails has disabled it by default because of a lack of a full example to migrate code. I suspect that the Rails config and Personally, I |
You're a hero, @dogweather! |
Upgrading
standard-rails
to 1.1.0 has started flagging things like:IMHO, an initializer is not "post initialization" and is the correct spot for this.
This comes from rubocop/rubocop-rails#1229 which specifically looks at
config/initializers/**/*.rb
to apply this rule.What do others think about removing that directory from this check? Happy to whip up a PR if there's enough interest.
The text was updated successfully, but these errors were encountered: