Skip to content

Commit

Permalink
Make Lint/UselessAccessModifier aware of ActiveSupport::Concern
Browse files Browse the repository at this point in the history
  • Loading branch information
Earlopain committed Nov 11, 2024
1 parent ad3287a commit de9a559
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#1385](https://github.com/rubocop/rubocop-rails/pull/1385): Make `Lint/UselessAccessModifier` aware of `ActiveSupport::Concern` and `Module#concerning`/`Module#concern` core extensions. ([@earlopain][])
14 changes: 14 additions & 0 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,20 @@ Lint/SafeNavigationChain:
- try!
- in?

Lint/UselessAccessModifier:
# Add methods from `ActiveSupport::Concern` and `Module::Concerning`:
# https://api.rubyonrails.org/classes/ActiveSupport/Concern.html
# https://api.rubyonrails.org/classes/Module/Concerning
inherit_mode:
merge:
- ContextCreatingMethods
ContextCreatingMethods:
- class_methods
- included
- prepended
- concern
- concerning

Rails:
Enabled: true
DocumentationBaseURL: https://docs.rubocop.org/rubocop-rails
Expand Down

0 comments on commit de9a559

Please sign in to comment.