Ignore rules with severity marked ignore in config
Problem to solve
As a developer, I want code quality MR widget to ignore rules that are below a threshold in my project, so I can fix actual code quality issues quickly without the mental load.
Intended users
Sasha (Software Developer) - who today just remembers which things to ignore but this leads to ignoring a lot of issues on accident.
User experience goal
The user should be able to specify in their .gitlab-ci.yml a threshold above which Code Quality alerts are displayed in the MR widget.
Proposal
- Add a variable to be passed to the Code Quality job that takes severity levels from the codeclimate.json file (info, minor, major, critical, blocker).
- Filter from display in the MR widget identified issues below the threshold, so if a user had set the keyword to 'major' only issues with severity of major, critical and blocker would display in the MR widget.
- Track expansions of the MR Widget when filtering occurs to contribute to the GMAU calculations.
Further details
- This is a first iteration towards fuller control by rule and file.
- It may be possible to extend this through the .codeclimate.yml file as well for plugins, a concept already used by codeclimate.
- This is already available for SAST scans so replicating this procedure may be the fastest / easiest implementation.
Permissions and Security
- Normal permissions of who can edit the gitlab-ci.yml file will be followed, this doesn't change that.
Documentation
- Update documentation to call out with an example how this works
- A before / after of the MR widget without and with this capability may be nice?
Availability & Testing
What does success look like, and how can we measure that?
Acceptance Criteria
- The CI linter passes with this new keyword added
- When a threshold is set only issues at and above that severity are seen in the MR widget
- All issues are still seen in the full code quality report
- Interactions with the MR widget when an issue is filtered is tracked
What is the type of buyer?
Developers who want to make use of Code Quality for linting and maintaining standards but don't want to be bothered by some items are likely to lead the decision on this feature. Since the MR Widget is available in GitLab Core this enhancement to that feature should land there as well.
Is this a cross-stage feature?
Links / references
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.