jqassistant-archive / jqa-core-framework

The core framework of jQAssistant providing the infrastructure for scanners, rules, analysis and reports.
http://jqassistant.org/
GNU General Public License v3.0
23 stars 6 forks source link

Rule status in XML report should consider warnOnSeverity/failOnSeverity thresholds #68

Closed DirkMahler closed 1 year ago

DirkMahler commented 2 years ago

The jQAssistant XML Report is used for reporting to QA dashboards like SonarQube or Teamscale. Therefore for each executed concept/constraint rule a result is provided including a status. The latter is a value out of "success", "failure", "warning" or "skipped". At this time all failed rules are reported as "failure", "warning" is not generated at all.

The reported status values shall now consider the configuration settings warn-on-severity and fail-on-severity, i.e. the status shall be failure if the effective severity of the executed rule exceeds fail-on-severity, warning if the effective severity exceeds warn-on-severity, otherwise success or skipped depending if if the rule has been executed at all.

As currently fail-on-severity also controls whether the Maven plugin or the CLI will break a build another configuration setting break-on-severity shall be introduced. It should default to the value of fail-on-severity and might accept value never. This allows to configure builds that break either at a higher severity (e.g. blocker) or never and thus still allow reporting to the tools mentioned above.