Skip to content

Commit

Permalink
Add Safe: false to Rails/RakeEnvironment
Browse files Browse the repository at this point in the history
  • Loading branch information
pocke committed Nov 3, 2019
1 parent 7a000ff commit 86ad82b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ Rails/Present:
Rails/RakeEnvironment:
Description: 'Set `:environment` task as a dependency to all rake task.'
Enabled: true
Safe: false
VersionAdded: '2.4'
Include:
- '**/Rakefile'
Expand Down
2 changes: 1 addition & 1 deletion manual/cops_rails.md
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,7 @@ UnlessBlank | `true` | Boolean

Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
--- | --- | --- | --- | ---
Enabled | Yes | No | 2.4 | -
Enabled | No | No | 2.4 | -

This cop checks rake task definition without `environment` dependency.
`environment` dependency is important because it loads application code
Expand Down

0 comments on commit 86ad82b

Please sign in to comment.