Prepare RuboCop upgrade
What does this MR do and why?
This MR prepares upgrade to RuboCop 1.36.0 in !96880 (merged).
It extracted two commits from that MR (!96880 (6bff737b) and !96880 (8e7413ae)) and reverted changes which performed the actual upgrade.
- Inherit from
RuboCop::Cop::Base
, notRuboCop::Cop::Cop
. - New auto-correction style -
extend RuboCop::Cop::AutoCorrector
, pass a block toadd_offense
rather than defining anautocorrect
method. -
add_offense
no longer takes alocation
keyword argument. - Specs should not set
subject(:cop)
as that will be done automatically, and will use the config correctly.
The spec pass with RuboCop 0.93.1
How to set up and validate locally
bin/rspec spec/rubocop
bundle exec rubocop --parallel
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