Enable InternalAffairs/CopDescriptionWithExample
What does this MR do and why?
Due to the Include
in https://gitlab.com/gitlab-org/ruby/gems/gitlab-styles/-/blob/master/rubocop-internal-affairs.yml#L20 not matching the structure of the gitlab-org/gitlab
repo the cop was not running for any of the cop files.
This change adds another Include
statement to ensure the right files are checked.
Originally, I added an enable at the root .rubocop.yml
file, with rubocop/cop/**/*.rb
as well as in .rubocop/internal_affairs.yml
, however, due to how rubocop/cop/.rubocop.yml
changes the config root, it seems this wasn't matching any files. By adding the include to rubocop/cop/.rubocop.yml
instead, and including all files in that directory (**/*.rb
) it seems to match the correct files now.
I also generated a todo for all the violations.
References
- MR to introduce
CopDescriptionWithExample
togitlab-styles
: gitlab-org/ruby/gems/gitlab-styles!236 (merged)
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.