diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b0d24672a..b00e7c51c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ * [#180](https://github.com/rubocop-hq/rubocop-rails/issues/180): Fix a false positive for `HttpPositionalArguments` when using `get` method with `:to` option. ([@koic][]) * [#193](https://github.com/rubocop-hq/rubocop-rails/issues/193): Make `Rails/EnvironmentComparison` aware of `Rails.env` is used in RHS or when `!=` is used for comparison. ([@koic][]) * [#205](https://github.com/rubocop-hq/rubocop-rails/pull/205): Make `Rails/ReversibleMigration` aware of `:to_table` option of `remove_foreign_key`. ([@joshpencheon][]) +* [#207](https://github.com/rubocop-hq/rubocop-rails/pull/207): Fix a false positive for `Rails/RakeEnvironment` when using Capistrano. ([@sinsoku][]) ## 2.4.2 (2020-01-26) diff --git a/config/default.yml b/config/default.yml index 7dead435a4..199cca414e 100644 --- a/config/default.yml +++ b/config/default.yml @@ -346,6 +346,8 @@ Rails/RakeEnvironment: Include: - '**/Rakefile' - '**/*.rake' + Exclude: + - 'lib/capistrano/tasks/**/*.rake' Rails/ReadWriteAttribute: Description: >- diff --git a/manual/cops_rails.md b/manual/cops_rails.md index 69a2eea615..7c33dfab25 100644 --- a/manual/cops_rails.md +++ b/manual/cops_rails.md @@ -1696,6 +1696,7 @@ end Name | Default value | Configurable values --- | --- | --- Include | `**/Rakefile`, `**/*.rake` | Array +Exclude | `lib/capistrano/tasks/**/*.rake` | Array ## Rails/ReadWriteAttribute