Extract the rubocop configuration from the GitLab-CE repository
The Gitaly team are adding Rubocop code checking to the Gitaly project in https://gitlab.com/gitlab-org/gitaly/merge_requests/342
Since the Rubocop configuration is embedded with the CE repository, we've had to copy the configuration across to Gitaly.
This means that over time, these configurations will drift.
Additionally, in order to avoid additional complexity, Gitaly is not copying the custom linters embedded within the rubocop directory, only the supplied ones. This includes the GitLab Security configurations.
Rubocop supports inheriting configurations from a gem file using inherit_gem
: https://rubocop.readthedocs.io/en/latest/configuration/
It would be great if the GitLab Rubocop configuration and custom linters (aka "cops") could be extracted out of the repository into a shared gem that could be used by all GitLab ruby projects.
This would give us a single central location in which code linters can be managed across projects and would help avoid configuration drift over time.