diff --git a/CHANGELOG.md b/CHANGELOG.md index 311426b09c2..703b288079d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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][]) diff --git a/config/default.yml b/config/default.yml index 148b492cec8..1f3552155fe 100644 --- a/config/default.yml +++ b/config/default.yml @@ -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 diff --git a/manual/cops_rails.md b/manual/cops_rails.md index cef62e3fe0f..7223cf1addf 100644 --- a/manual/cops_rails.md +++ b/manual/cops_rails.md @@ -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.