From d159b891332bb9e87119b28d8be322a543934e64 Mon Sep 17 00:00:00 2001 From: Frank Niessink Date: Thu, 23 Jan 2025 09:11:05 +0100 Subject: [PATCH] Support the new SonarQube impact severity levels "blocker" and "info", introduced in SonarQube v10.8. Closes #10708. --- .../src/shared_data_model/sources/sonarqube.py | 13 ++++++++----- docs/src/changelog.md | 4 ++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/components/shared_code/src/shared_data_model/sources/sonarqube.py b/components/shared_code/src/shared_data_model/sources/sonarqube.py index 9826297229..06ca96c802 100644 --- a/components/shared_code/src/shared_data_model/sources/sonarqube.py +++ b/components/shared_code/src/shared_data_model/sources/sonarqube.py @@ -35,6 +35,9 @@ def violation_entity_attributes( name="Impact", key="impacts", color={ + "blocker impact on maintainability": Color.NEGATIVE, + "blocker impact on reliability": Color.NEGATIVE, + "blocker impact on security": Color.NEGATIVE, "high impact on maintainability": Color.NEGATIVE, "high impact on reliability": Color.NEGATIVE, "high impact on security": Color.NEGATIVE, @@ -329,7 +332,7 @@ def violation_entity_attributes( metrics=ALL_SONARQUBE_METRICS, ), "private_token": PrivateToken( - help_url=HttpUrl("https://docs.sonarqube.org/latest/user-guide/user-token/"), + help_url=HttpUrl("https://docs.sonarsource.com/sonarqube-server/latest/user-guide/managing-tokens/"), metrics=ALL_SONARQUBE_METRICS, ), "component": StringParameter( @@ -341,7 +344,7 @@ def violation_entity_attributes( "branch": StringParameter( name="Branch (only supported by commercial SonarQube editions)", short_name="branch", - help_url=HttpUrl("https://docs.sonarqube.org/latest/branches/overview/"), + help_url=HttpUrl("https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/branch-analysis/introduction/"), default_value="main", metrics=PROJECT_METRICS, ), @@ -365,8 +368,8 @@ def violation_entity_attributes( "impact_severities": Severities( name="Impact severities", placeholder="all impact severities", - help_url=HttpUrl("https://docs.sonarsource.com/sonarqube/latest/user-guide/issues/#issue-severity"), - values=["low", "medium", "high"], + help_url=HttpUrl("https://docs.sonarsource.com/sonarqube-server/latest/user-guide/rules/overview/"), + values=["info", "low", "medium", "high", "blocker"], metrics=["security_warnings", "suppressed_violations", "violations"], ), "impacted_software_qualities": MultipleChoiceParameter( @@ -429,7 +432,7 @@ def violation_entity_attributes( name="Tags to include", short_name="tags", placeholder="all tags", - help_url=HttpUrl("https://docs.sonarsource.com/sonarqube/latest/user-guide/issues/"), + help_url=HttpUrl("https://docs.sonarsource.com/sonarqube-server/latest/user-guide/rules/built-in-rule-tags/"), metrics=["security_warnings", "violations"], ), }, diff --git a/docs/src/changelog.md b/docs/src/changelog.md index 6c4819d148..22ec88d6dc 100644 --- a/docs/src/changelog.md +++ b/docs/src/changelog.md @@ -14,6 +14,10 @@ If your currently installed *Quality-time* version is not the latest version, pl ## [Unreleased] +### Added + +- Support the new SonarQube impact severity levels "blocker" and "info", introduced in SonarQube v10.8. Closes [#10708](https://github.com/ICTU/quality-time/issues/10708). + ### Fixed - Use browser locale to determine the first day of the week in date pickers. Fixes [#7250](https://github.com/ICTU/quality-time/issues/7250).