Skip to content

Commit

Permalink
Mark Rails/LexicallyScopedActionFilter as unsafe
Browse files Browse the repository at this point in the history
In the previous commit we documented an inheritance case in which the
Rails/LexicallyScopedActionFilter cop recommends unsafe edits that have
semantic implications.

Since not everyone will see the documentation examples, we're also
marking the cop as unsafe to signal that its recommendations should be
treated carefully.
  • Loading branch information
urbanautomaton authored and bbatsov committed Apr 4, 2019
1 parent 1f5e9fb commit 75edcaa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -19,6 +19,7 @@

### Changes

* [#6854](https://github.com/rubocop-hq/rubocop/pull/6854): Mark Rails/LexicallyScopedActionFilter as unsafe and document risks. ([@urbanautomaton][])
* [#5977](https://github.com/rubocop-hq/rubocop/issues/5977): Warn for Performance Cops. ([@koic][])
* [#6637](https://github.com/rubocop-hq/rubocop/issues/6637): Move `LstripRstrip` from `Performance` to `Style` department and rename it to `Strip`. ([@anuja-joshi][])

Expand Down
1 change: 1 addition & 0 deletions config/default.yml
Expand Up @@ -2445,6 +2445,7 @@ Rails/LexicallyScopedActionFilter:
Description: "Checks that methods specified in the filter's `only` or `except` options are explicitly defined in the controller."
StyleGuide: 'https://github.com/rubocop-hq/rails-style-guide#lexically-scoped-action-filter'
Enabled: true
Safe: false
VersionAdded: '0.52'
Include:
- app/controllers/**/*.rb
Expand Down
2 changes: 1 addition & 1 deletion manual/cops_rails.md
Expand Up @@ -1164,7 +1164,7 @@ Include | `app/models/**/*.rb` | Array

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

This cop checks that methods specified in the filter's `only` or
`except` options are defined within the same class or module.
Expand Down

0 comments on commit 75edcaa

Please sign in to comment.