Draft: Use rubocop directly for Code Quality
What does this MR do and why?
This MR adds a separate rubocop_code_quality
job that formats rubocop output in a format that will allow it to show in the format that allows findings to show in Code Quality functionality, but it does this outside of Code Climate, which gets used via the Code-Quality.gitlab-ci.yml
template.
This is being done as a part of Dogfood bring-your-own Code Quality for gitlab-... (#385110 - closed) • rossfuhrman • Backlog • On track
The thinking for the rubocop_code_quality
job being separate is that I'd like to get this functionality added as soon as possible so that we can dogfood it and show it as an example of how to do this. I think we should be able to merge the rubocop
and rubocop_code_quality
jobs in the future.
violations-command-line
was chosen for the number of formats it supports.
Latest pipeline (without any *.rb changes): https://gitlab.com/gitlab-org/gitlab/-/pipelines/852396381/
- rubocop job: https://gitlab.com/gitlab-org/gitlab/-/jobs/4199589874
- rubocop_code_quality job: https://gitlab.com/gitlab-org/gitlab/-/jobs/4199589875
Pipeline for commit that adds a violation in a *.rb file https://gitlab.com/gitlab-org/gitlab/-/pipelines/851315398
- rubocop job: https://gitlab.com/gitlab-org/gitlab/-/jobs/4192920765
- rubocop_code_quality job: https://gitlab.com/gitlab-org/gitlab/-/jobs/4192920769
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.