Skip to content

Draft: Use rubocop directly for Code Quality

rossfuhrman requested to merge rf-rubocop-cq-output into master

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) • 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/

Pipeline for commit that adds a violation in a *.rb file https://gitlab.com/gitlab-org/gitlab/-/pipelines/851315398

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by rossfuhrman

Merge request reports