Skip to content

Upgrade to GitLab Styles 9

Sean McGivern requested to merge test-rubocop-1-3-5-upgrade into master

This contains upgrades RuboCop to 1.3.6 and RuboCop RSpec to 2.12.1. See gitlab-org/ruby/gems/gitlab-styles!119 (merged) for more details.

Notable changes here are:

  1. Cops now get their namespace from all but the last and the first two components, rather than simply the last component. See https://github.com/rubocop/rubocop/pull/8490
  2. There is no more TopLevelDescribe helper for Rubocop RSpec, it's now TopLevelGroup. See https://github.com/rubocop/rubocop-rspec/pull/977
  3. RuboCop Rails now complains if db/schema.rb doesn't contain a schema.

For existing cops in our codebase, see !97518 (merged).

This MR contains two commits in an attempt to make it easier to review:

  1. The initial upgrade, with deletions of db/schema.rb and ee/db/geo/schema.rb as these now cause a cop to error. This also sets NewCops: disable as we should enable any of these in gitlab-styles first: gitlab-org/ruby/gems/gitlab-styles#40 is a related issue.
  2. Run bundle exec rake rubocop:todo:generate on the existing cops with new offenses (bundle exec rubocop --parallel --format offenses). See !96880 (comment 1086831683) for a partial list here.

The second commit is the one that's most likely to need to be updated as we go. The rest should be stable unless we add new cops.

Edited by Sean McGivern

Merge request reports