Refine checkstyle configuration to be more granular regarding severity of violations #6

Closed
opened 2026-03-18 10:32:50 +01:00 by lars.winzer · 9 comments
lars.winzer commented 2026-03-18 10:32:50 +01:00 (Migrated from git.scicore.unibas.ch)

Feature Request

Summary

Rework severity indicator of Checkstyle task and update script used in checkstyle-report job accordingly.

Required workarround

None

Description

Old issue discription:

Currently checkstyle is configured to mark every violation of configured rules as an error.

The generated .xml file by checkstyle job is used by the checkstyle-report job to create a GitLab code quality report, setting all findings to severity minor.

I propose that not everything should be of severity error .

Reason being: The noise. Not every error should be treated the same, and some violations (wrong naming of variables, ...) have a higher severity than others (wrong import order, ...).

Additonally, If the pipeline fails with error 's, the merge request should be rejected.

In every case a commit should NOT be blocked to keep the git history intact.

Checklist

  • I reproduced the problem using the steps above
  • I searched documentation docs for relevant information
  • I added relevant labels
## Feature Request <!--The reccommended type is: Task--> ### Summary Rework severity indicator of Checkstyle task and update script used in checkstyle-report job accordingly. ### Required workarround None ### Description Old issue discription: > Currently checkstyle is configured to mark every violation of configured rules as an error. > > The generated `.xml` file by `checkstyle` job is used by the `checkstyle-report` job to create a GitLab code quality report, setting all findings to severity `minor`. > > I propose that not everything should be of severity `error` . > > Reason being: The noise. Not every error should be treated the same, and some violations (wrong naming of variables, ...) have a higher severity than others (wrong import order, ...). > > Additonally, If the pipeline fails with `error` 's, the merge request should be rejected. > > In every case a commit should NOT be blocked to keep the git history intact. ### Checklist - [x] ~~I reproduced the problem using the steps above~~ - [x] ~~I searched documentation docs for relevant information~~ - [x] I added relevant labels
lars.winzer commented 2026-03-30 13:59:21 +02:00 (Migrated from git.scicore.unibas.ch)

marked this issue as related to #24

marked this issue as related to #24
lars.winzer commented 2026-03-30 13:59:40 +02:00 (Migrated from git.scicore.unibas.ch)

changed type from issue to task

changed type from issue to task
lars.winzer commented 2026-03-30 14:01:35 +02:00 (Migrated from git.scicore.unibas.ch)

changed the description

changed the description
lars.winzer commented 2026-03-30 14:27:48 +02:00 (Migrated from git.scicore.unibas.ch)

changed title from Refine checkstyle pipeline to block MR when coding conventions are violated to Refine checkstyle configuration to be more granular regarding severity of violations

<p>changed title from <code class="idiff">Refine checkstyle <span class="idiff left deletion">pipeline to block MR when coding conventions are</span> violat<span class="idiff right deletion">ed</span></code> to <code class="idiff">Refine checkstyle <span class="idiff left addition">configuration to be more granular regarding severity of</span> violat<span class="idiff right addition">ions</span></code></p>
lars.winzer commented 2026-03-30 15:12:39 +02:00 (Migrated from git.scicore.unibas.ch)

assigned to @lars.winzer

assigned to @lars.winzer
lars.winzer commented 2026-03-30 15:24:10 +02:00 (Migrated from git.scicore.unibas.ch)

created branch chore/6-refine-checkstyle-configuration-regarding-severity to address this issue

created branch [`chore/6-refine-checkstyle-configuration-regarding-severity`](/cs108-fs26/Gruppe-13/-/compare/main...chore%2F6-refine-checkstyle-configuration-regarding-severity) to address this issue
lars.winzer commented 2026-03-30 15:49:52 +02:00 (Migrated from git.scicore.unibas.ch)

added 25m of time spent at 2026-03-30 12:00:00 +0200

added 25m of time spent at 2026-03-30 12:00:00 +0200
lars.winzer commented 2026-03-30 15:50:44 +02:00 (Migrated from git.scicore.unibas.ch)

It proves to be difficult to integrate these changes, as both a warning and info for checkstyle is no failed build for gradle.

But as the pipeline relies on a build failure to block the merge, a successful build would allow a merge with these violations.

It proves to be difficult to integrate these changes, as both a `warning` and `info` for checkstyle is no failed build for gradle. But as the pipeline relies on a build failure to block the merge, a successful build would allow a merge with these violations.
lars.winzer (Migrated from git.scicore.unibas.ch) closed this issue 2026-04-07 17:53:27 +02:00
lars.winzer commented 2026-04-07 17:53:29 +02:00 (Migrated from git.scicore.unibas.ch)

This issue will be closed for now. It might get revisited in a future milestone.

This issue will be closed for now. It might get revisited in a future milestone.
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: University-of-Basel-Studentprojects/Programmierprojekt#6