Skip to content

Commit

Permalink
Make Rails/EnvironmentVariableAccess aware of initializers.
Browse files Browse the repository at this point in the history
  • Loading branch information
markokajzer committed Jan 10, 2024
1 parent cb01e4d commit c72463e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog/change_fix_do_not_allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#1229](https://github.com/rubocop/rubocop-rails/pull/1229): Make `Rails/EnvironmentVariableAccess` aware of initializers. ([@markokajzer][])
3 changes: 2 additions & 1 deletion config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,10 @@ Rails/EnvironmentVariableAccess:
# TODO: Set to `pending` status in RuboCop Rails 2 series when migration doc will be written.
Enabled: false
VersionAdded: '2.10'
VersionChanged: '2.11'
VersionChanged: '<<next>>'
Include:
- app/**/*.rb
- config/initializers/**/*.rb
- lib/**/*.rb
Exclude:
- lib/**/*.rake
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/cops_rails.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2068,7 +2068,7 @@ ENV["FOO"] = "bar"
| Name | Default value | Configurable values
| Include
| `+app/**/*.rb+`, `+lib/**/*.rb+`
| `+app/**/*.rb+`, `+config/initializers/**/*.rb+`, `+lib/**/*.rb+`
| Array
| Exclude
Expand Down

0 comments on commit c72463e

Please sign in to comment.