The source project of this merge request has been removed.
Update rubocop target ruby version
What does this MR do?
Updates our rubocop version to target v2.5 rather than 2.3 (presumably the default?)
2.5 introduces new syntax around ensure
that is already creeping into our codebase. Rubocop should accept it. Example failure: https://gitlab.com/nick.thomas/gitlab-ce/-/jobs/153747894 .
The old syntax looks like, e.g.:
around do
begin
ensure
end
end
foo.each do |x|
begin
rescue
end
end
The new syntax looks like, e.g.:
around do
ensure
end
foo.each do |x|
rescue
end
Other changes include:
- Mandating the
unpack1(...)
method instead of usingunpack(...)[0]
- Mandating
.match?
instead of=~
. I disabled this one as it's not always safe to do this.
All corrections were automatically generated through bundle exec rubocop -a
. We shouldn't merge this unless it's quite close to HEAD as otherwise, we risk making master red.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Edited by Nick Thomas