Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix #1039] Deprecate Rails/ActionFilter cop #1149

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

koic
Copy link
Member

@koic koic commented Oct 10, 2023

Fixes #1039.

This PR deprecates Rails/ActionFilter cop. Because the *_filter methods were removed in Rails 4.2, and that Rals version is no longer supported by RuboCop Rails. This cop will be removed in RuboCop Rails 3.0.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.
  • If this is a new cop, consider making a corresponding update to the Rails Style Guide.

@koic koic changed the title [Fix #1039] Deprecate Rails/ActionFilter [Fix #1039] Deprecate Rails/ActionFilter cop Oct 10, 2023
Fixes rubocop#1039.

This PR deprecates `Rails/ActionFilter` cop. Because the `*_filter` methods were removed in Rails 4.2,
and that Rals version is no longer supported by RuboCop Rails. This cop will be removed in RuboCop Rails 3.0.
@koic koic force-pushed the deprecate_rails_action_filter_cop branch from e051432 to 1874ad8 Compare October 10, 2023 03:22
@koic koic merged commit 5624268 into rubocop:master Oct 12, 2023
10 checks passed
@koic koic deleted the deprecate_rails_action_filter_cop branch October 12, 2023 02:03
@phil-workato
Copy link

Thanks!
Should we Enable: false it as well as planned?

@koic
Copy link
Member Author

koic commented Oct 12, 2023

Ah, that's a good idea! I think it can be disabled right away.

koic added a commit that referenced this pull request Oct 13, 2023
Follow up #1149 (comment).

This commit disables `Rails/ActionFilter` cop.
mjankowski added a commit to mjankowski/standard-rails that referenced this pull request May 31, 2024
History in standard-rails:

- Disabled in initial rules import
- Enabled in bulk rails rule enable commit

This cop is both disabled by default and deprecated in rubocop-rails:
rubocop/rubocop-rails#1149

Rationale is that the cop is only relevant to Rails versions so early
they are no longer supported by rubocop-rails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove the outdated Rails/ActionFilter cop
2 participants