Skip to content

Commit

Permalink
Merge pull request #1097 from koic/make_style_invertible_unless_condi…
Browse files Browse the repository at this point in the history
…tion_aware_of_as_methods

[Fix #1015] Make `Style/InvertibleUnlessCondition` aware of Active Support methods
  • Loading branch information
koic authored Sep 4, 2023
2 parents d5ad647 + fb30416 commit d930b59
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#1015](https://github.com/rubocop/rubocop-rails/issues/1015): Make `Style/InvertibleUnlessCondition` aware of Active Support methods. ([@koic][])
8 changes: 8 additions & 0 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,14 @@ Style/FormatStringToken:
AllowedMethods:
- redirect

Style/InvertibleUnlessCondition:
InverseMethods:
# Active Support defines some common inverse methods. They are listed below:
:present?: :blank?
:blank?: :present?
:include?: :exclude?
:exclude?: :include?

Style/SymbolProc:
AllowedMethods:
- define_method
Expand Down

0 comments on commit d930b59

Please sign in to comment.