Fix RuboCop offenses for Lint/UselessMethodDefinition
What does this MR do and why?
This MR fixes all offenses for Lint/UselessMethodDefinition
and enables it again as it was disabled due to too many offenses previously.
This MR also disables some offenses:
- We need to re-expose some Rails' internal method
status
as action - Limit amount of passed parameters
The self-review contains more details and also references commit shas of latest refactoring to give more context on why
Related to #354328 (closed)
Process
bundle exec rake 'rubocop:todo:generate[Lint/UselessMethodDefinition]'
files=$(rg -r '$1' "\s*- '(.*)'" .rubocop_todo/lint/useless_method_definition.yml | xargs)
bundle exec rubocop -A --only Lint/UselessMethodDefinition,Layout/TrailingWhitespace,Layout/EmptyLineBetweenDefs,Layout/EmptyLines,Layout/EmptyLinesAroundClassBody $files
# Manual post-process
Screenshots or screen recordings
n/a
How to set up and validate locally
n/a
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Peter Leitzen