Skip to content

Commit

Permalink
[Fix #206] Fix a false positive for Rails/RakeEnvironment when usin…
Browse files Browse the repository at this point in the history
…g Capistrano

It excludes the directory where Capistrano tasks are located.
Because these tasks don't need to invoke the `:environment` task,
and the directory structure is the official way.
ref: https://github.com/capistrano/capistrano/tree/v3.12.0#capify-your-project

Fixes #206
  • Loading branch information
sinsoku committed Feb 28, 2020
1 parent 7506a31 commit e8c2450
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 2 additions & 0 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ Rails/RakeEnvironment:
Include:
- '**/Rakefile'
- '**/*.rake'
Exclude:
- 'lib/capistrano/tasks/**/*.rake'

Rails/ReadWriteAttribute:
Description: >-
Expand Down

0 comments on commit e8c2450

Please sign in to comment.