During the effort for unifying the RuboCop runs on our Jenkins and making it more reliable and helpful, we’ve decided to create a common gem, that would be used by core and would offer the plugin maintainers the same set of RuboCop rules as core uses.
Repo should keep the cops tidy and disable only the very irritating cops, but allow a choice for plugin maintainers to use only some category of the rules or override the config in their .rubocop file.
Advantages:
Enables to run simple bundle exec rubocop on CI of choice without a need to have foreman core repository around
versioning this gem allows plugin maintainers upgrade at their pace
no need to copy the rules over to the plugin and wondering what rule is disabled just because core is not ready yet
rules organization into categories
discussions about rules in GH issues in the repo will make them easy to search
Disadvantages (caveats):
We need to decide what rules to enable
We need to migrate all plugins
We need to name the gem
The last caveat being the hardest to solve, thus the most urgent, please help with that.
theforeman-rubocop
theforeman-styles
rubocop-foreman
idontcare
0voters
If you have any insight on how to vote on the rules, or idea how to organize the cops, your voice is welcome!
I’ve had a similar thought process
Although someone might argue we can add another styles (javascript) in the future, or that we might add our own rules.
But I guess what future brings is in the wind and we should not meditate on that before it comes, given it doesn’t seem likely ATM.
Just to mention: obviously if someone can think of even better name than I got in the poll, please share it with us!
What is the status of this effort? Are you tracking some TODO list in this regard? It looks like we have landed on a name, github repo now exists and no objections were raised. I do believe this is worth the effort.
What I see is:
Update foreman_template template plugin
Update other major plugins (file PRs, maintainers will decide if they like it or not)
Update our Handbook manual with instructions where to find those rules
I also have a suggestion for versioning. Since every single change can cause test breakage for plugins, semantic versioning or any kind of arbitrary versioning does not make much sense. So I propose to do some time-based versining: 2021.3.29 in the format of YYYY.M.D.
Plugin authors can then decide how often they will get updates - yearly, monthly or daily.