Skip to content

Refactor RuboCop TodoFormatter and its machinery

Peter Leitzen requested to merge pl-rubocop-todo-formatter-refactor into master

What does this MR do and why?

This MR refactors parts of RuboCop TodoFormatter and its collaborators.

It also removes the ability to disable cops based on amount of offenses. Now, we still keep cops disabled if they were disabled previously but we no longer care about the amount of offenses anymore.

This MR also adds the ability to configure base_directory which will become useful for JH. See Refs #356503 (comment 900895887).

We trust the (previous) process/decision.

See individual commit messages for more details and please don't squash.

Follow-up of !82100 (merged).

Screenshots or screen recordings

n/a

How to set up and validate locally

Run related specs

bin/rspec spec/tasks/rubocop_rake_spec.rb spec/rubocop/formatter/todo_formatter_spec.rb spec/rubocop/todo_dir_spec.rb

Regenerate RuboCop TODOs

bundle exec rake 'rubocop:todo:generate[Gitlab/NamespacedClass,Lint/Syntax]'

bundle exec rake rubocop:todo:generate

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports

Loading