GitLab Code Quality in the Multiverse of Madness

 > Me

> gitlab codequality widget in gitlab MR view

> Displays "Code Quality hasn't changed."

> Sus

> Starts debugging

> Checks if the codequality schema is valid

> Output schema valid

> Visible confusion

> Checks gitlab docs

> After 2 days of debugging i was able to fix it

 

Whats needed for gitlab to display codequality MR widget?

> Both base and target branch must have branch pipelines, not MR pipelines

> The codequality json file must have schema https://docs.gitlab.com/ci/testing/code_quality/#code-quality-report-format 

> Both base and target branch must have codequality artifact

> For me all of the conditions were met.

 

What went wrong ?

 Even though the schema is valid, gitlab doesn't specify this key info in their docs.

check_name: A unique name representing the check, or rule, associated with this violation.

 > This parameter check_name should never have any spaces in it

> Having spaces in this field will silently fail the codequality report

 

a close up of a man in a superhero costume with his mouth open . 

 

> bYE. 

 

Share:

0 comments:

Post a Comment