Management of Rubocop exception files

#1

For a given NEW rubocop problem you introduce in the code:

  • if you can, fix the problem in the code (make line or method shorter for example)
  • if the problem is acceptable, add local exception like this
  • if the problem is not acceptable but requires too much work, you can add the exception to the manual todo list

For existing problems you want to fix:

  • you can remove the exception from the manual todo list and fix the code problem

No exceptions should be on the styleguide, this file should not contain any exceptions.

Regarding the automatically generated todo list we can:

  • option 1: manually remove from auto todo as you fix rubocop problems
  • option 2: rerun command to regenerate auto todo

We can run option 2 regularly for example in every PR that changes the style.

ping @sauloperez @Matt-Yorkley @kristinalim

#2

Totally agree. Thanks for looking into it.

Regarding the ruboco_todo, shouldn’t we regenerate it whenever we fix a violation instead of editing it manually? Is there a problem I’m not aware of that makes it easier to edit manually? In any case, it’s not a big deal though.

1 Like
#3

yeah, we can regenerate regularly yes. I did it yesterday as part of PR 3842

#4

This sounds good to me! And I also prefer running the auto-generate script over editing manually.

Thanks for organizing and writing this up, @luisramos0.