From: stanislavh Date: Mon, 9 Oct 2023 12:49:53 +0000 (+0200) Subject: SONAR-20547 Add conditional check CC category for security hotspot X-Git-Tag: 10.3.0.82913~231 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d2980aff4d6bc9b1a0b6a0e698146aaa916de158;p=sonarqube.git SONAR-20547 Add conditional check CC category for security hotspot --- diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx index 800733aa422..80abc67bffd 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx @@ -233,16 +233,22 @@ function RuleCell({ rule, severity }: Readonly<{ rule: RuleCompare; severity?: s {rule.name} - + {(rule.cleanCodeAttributeCategory || rule.impacts.length > 0) && ( + + )} ); } diff --git a/server/sonar-web/src/main/js/helpers/testMocks.ts b/server/sonar-web/src/main/js/helpers/testMocks.ts index 1b593839bdd..53fc466a14a 100644 --- a/server/sonar-web/src/main/js/helpers/testMocks.ts +++ b/server/sonar-web/src/main/js/helpers/testMocks.ts @@ -505,13 +505,7 @@ export function mockCompareResult(overrides: Partial = {}): Com ], modified: [ { - cleanCodeAttributeCategory: CleanCodeAttributeCategory.Consistent, - impacts: [ - { - softwareQuality: SoftwareQuality.Maintainability, - severity: SoftwareImpactSeverity.Low, - }, - ], + impacts: [], key: 'java:S1698', name: '== and != should not be used when equals is overridden', left: { params: {}, severity: 'MINOR' },