Skip to content

Configure new rubocop cops

Doug Stull requested to merge configure-new-cops into master
  • Default configuration for new cops with prejudice. Links to docs match the version in our current gemspec.
  • start rubocop config files with --- as per more strict yml guidelines
  • Fix rubocop issues detected by the new cop config.

Envisioned process for implementation in GitLab:

  1. Agree at a higher level the default settings here as I've found some of the lining decisions when polled with team members are based on 'how many offences there are in GitLab', which is hard to do w/o the help of a rubocop run.
  2. Create a version bump MR to 5.0.0.
  3. Implement in GitLab, turning off all the new cops in the .rubocop.yml file in GitLab.
  4. Enabled/follow the standard process for enabling/disabling new rules in GitLab codebase(linting/style MR template).
  5. Backfill this gem with final decisions and make them the default.
  6. Remove local settings in GitLab if defaults from this gem are in line.
  7. Implement/Upgrade accordingly in various internal apps - Versions, Customers, License, etc.

Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/263244

Edited by Doug Stull

Merge request reports