Upgrade `gilab-styles` to 9.2.0
What does this MR do and why?
Upgrade gitlab-styles
to 9.2.0
.
See https://gitlab.com/gitlab-org/ruby/gems/gitlab-styles/-/releases/v9.2.0 for the changelog.
This MR also generates TODOs for all new/changed cops and put them in "grace period" as per https://docs.gitlab.com/ee/development/rubocop_development_guide.html#enabling-a-new-cop.
Two RuboCop offenses were fixed in HAML as the RuboCop TODOs won't work there
Checklist
-
Verify upcoming release of gitlab-styles
-
Point to "Release" MR of gitlab-styles
inGemfile
- For example,
gem 'gitlab-styles', '~> 9.2.0', require: false, git: 'https://gitlab.com/gitlab-org/ruby/gems/gitlab-styles.git', ref: 'bump-version-9.2.0'
- For example,
-
Update bundler's checksum file via bundle exec bundler-checksum init
-
rubocop
job-
Inspect any warnings/errors -
(Optional) Generate TODOs for pending offenses -
Put 🆕 cop rules (or if configuration is changed) in "grace period". See docs. -
(Optional) Remove any offenses for disabled cops - Use
grep --perl-regexp -o ":\d+\d+: \w: \[\S+\] ([\w/]+)" raw_job_output.log | awk '{print $4}' | sort | uniq -c
to get a list of cop rules with offenses. Whereraw_job_output.log
is the raw output of therubocop
job -
Ignore offenses related to temporary changes in Gemfile
-
-
(Optional) Autocorrect offenses -
Compare the total runtime of rubocop --parallel
scan with previous runs
-
-
Make sure CI passes 💚 -
Don't merge this MR yet! -
Wait for gitlab-styles
to be released
-
-
Upgrade released version of gitlab-styles
-
Make sure release is complete -
Rephrase the title and MR description to match final upgrade -
Point to released version in Gemfile
-
gem 'gitlab-styles', '~> 9.2.0', require: false
-
Update bundler's checksum file via bundle exec bundler-checksum init
-
-
(Optional) Regenerate TODOs for new/changed cop rules -
Make sure CI passes 💚 -
Let the MR being reviewed again and merged -
(Optional) Refine this MR template.
-
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.
New offenses
Via
$ bundle exec rubocop --parallel --format offenses
1924 Layout/ArrayAlignment
496 Layout/LineEndStringConcatenationIndentation
488 Layout/LineContinuationSpacing
256 Layout/FirstArrayElementIndentation
238 Layout/FirstHashElementIndentation
236 Lint/AmbiguousRegexpLiteral
179 Performance/MapCompact
161 Layout/LineContinuationLeadingSpace
54 Performance/StringIdentifierArgument
43 Layout/FirstArgumentIndentation
43 Layout/ParameterAlignment
39 Performance/FlatMap
18 Performance/RedundantEqualityComparisonBlock
3 Performance/RedundantSplitRegexpArgument
2 Layout/HashAlignment
1 Performance/ConcurrentMonotonicTime
--
4181 Total in 1213 files
RuboCop TODOs
$ bundle exec rake rubocop:todo:generate[Layout/ArrayAlignment,Layout/LineEndStringConcatenationIndentation,Layout/LineContinuationSpacing,Layout/FirstArrayElementIndentation,Layout/FirstHashElementIndentation,Lint/AmbiguousRegexpLiteral,Performance/MapCompact,Layout/LineContinuationLeadingSpace,Performance/StringIdentifierArgument,Layout/FirstArgumentIndentation,Layout/ParameterAlignment,Performance/FlatMap,Performance/RedundantEqualityComparisonBlock,Performance/RedundantSplitRegexpArgument,Layout/HashAlignment,Performance/ConcurrentMonotonicTime]
Edited by Peter Leitzen