Add support for multiple code_quality reports for Full Code Quality report
Problem to solve
Some projects use more than one code quality check and generate multiple reports in the format GitLab can read but only one report is found and rendered in the Full Code Quality Report
Target audience
Software Developers
Further details
In !8612 comment 121731691 was stated:
I think we're going to extend this feature in the future. Currently, we don't have enough resource to support multiple code quality reports.
In frontend development, often multiple linters are used for multiple languages or use cases. For example, it is common to use ESLint, Stylelint, Remark Lint, and / or Prettier.
#328257 (closed) is completed and deployed.
Proposal - Update 2021-06-10: This issue should be resolved whenLet's grab all / any artifacts that are found in artifacts:reports:codequality:
and concatenate them together if they match our required format.
We may need to consider removing duplicate issues so as not to clutter up the Merge Request or Full report views.
We should match the current sorting of the pipeline page (sort by severity descending), but perform that sort in the backend. Once that is in place, we should also remove the sorting from the frontend as it will no longer be necessary.
backend
- Introduce new GraphQL API, #328257 (closed)
- Remove REST API codequality EE controller
- Filter degradation by severity - Call sort_degradations! in our graphql api
From the original writeup
I don’t know any of the internals. I guess concat the results for all job code_quality artifacts instead of picking the last one.
What does success look like, and how can we measure that?
A pipeline should be defined which exposes code_quality artifacts for multiple jobs. Results from all of these code quality jobs should be rendered, instead of only those from one job.
Links / references
- Moving the comparison to the backend solved this for the MR widget.
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.