Skip to content

Commit

Permalink
Add jobs & mailers to default filter/action callbacks cops
Browse files Browse the repository at this point in the history
They use the same `filter`/`action` API.
  • Loading branch information
ojab committed May 27, 2022
1 parent 3a93706 commit 5e3e0c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Add jobs & mailers to default `filter`/`action` callbacks cops. ([@ojab][])
8 changes: 7 additions & 1 deletion config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Rails/ActionFilter:
- filter
Include:
- app/controllers/**/*.rb
- app/jobs/**/*.rb
- app/mailers/**/*.rb

Rails/ActiveRecordAliases:
Description: >-
Expand Down Expand Up @@ -477,6 +479,8 @@ Rails/IgnoredSkipActionFilterOption:
VersionAdded: '0.63'
Include:
- app/controllers/**/*.rb
- app/jobs/**/*.rb
- app/mailers/**/*.rb

Rails/IndexBy:
Description: 'Prefer `index_by` over `each_with_object`, `to_h`, or `map`.'
Expand Down Expand Up @@ -505,13 +509,15 @@ Rails/InverseOf:
- app/models/**/*.rb

Rails/LexicallyScopedActionFilter:
Description: "Checks that methods specified in the filter's `only` or `except` options are explicitly defined in the controller."
Description: "Checks that methods specified in the filter's `only` or `except` options are explicitly defined in the class."
StyleGuide: 'https://rails.rubystyle.guide#lexically-scoped-action-filter'
Enabled: true
Safe: false
VersionAdded: '0.52'
Include:
- app/controllers/**/*.rb
- app/jobs/**/*.rb
- app/mailers/**/*.rb

Rails/LinkToBlank:
Description: 'Checks that `link_to` with a `target: "_blank"` have a `rel: "noopener"` option passed to them.'
Expand Down

0 comments on commit 5e3e0c6

Please sign in to comment.