From 4e4dc8dd974f5c5c5dc585e9a2032d310e7a54b8 Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Wed, 26 Jun 2019 15:28:32 +0200 Subject: SONAR-12118 Disable UNKNOWN issue type for custom rules --- .../__tests__/__snapshots__/CustomRuleFormModal-test.tsx.snap | 8 -------- server/sonar-web/src/main/js/helpers/constants.ts | 8 +------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/CustomRuleFormModal-test.tsx.snap b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/CustomRuleFormModal-test.tsx.snap index c359c8ec9c4..f244d57d3dd 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/CustomRuleFormModal-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/CustomRuleFormModal-test.tsx.snap @@ -105,10 +105,6 @@ exports[`should handle re-activation 1`] = ` "label": "issue.type.SECURITY_HOTSPOT", "value": "SECURITY_HOTSPOT", }, - Object { - "label": "issue.type.UNKNOWN", - "value": "UNKNOWN", - }, ] } searchable={false} @@ -340,10 +336,6 @@ exports[`should render correctly 1`] = ` "label": "issue.type.SECURITY_HOTSPOT", "value": "SECURITY_HOTSPOT", }, - Object { - "label": "issue.type.UNKNOWN", - "value": "UNKNOWN", - }, ] } searchable={false} diff --git a/server/sonar-web/src/main/js/helpers/constants.ts b/server/sonar-web/src/main/js/helpers/constants.ts index 27a7a0bc86a..cf1546d0203 100644 --- a/server/sonar-web/src/main/js/helpers/constants.ts +++ b/server/sonar-web/src/main/js/helpers/constants.ts @@ -27,13 +27,7 @@ export const ISSUE_TYPES: T.IssueType[] = [ 'CODE_SMELL', 'SECURITY_HOTSPOT' ]; -export const RULE_TYPES: T.RuleType[] = [ - 'BUG', - 'VULNERABILITY', - 'CODE_SMELL', - 'SECURITY_HOTSPOT', - 'UNKNOWN' -]; +export const RULE_TYPES: T.RuleType[] = ['BUG', 'VULNERABILITY', 'CODE_SMELL', 'SECURITY_HOTSPOT']; export const RULE_STATUSES = ['READY', 'BETA', 'DEPRECATED']; export const CHART_COLORS_RANGE_PERCENT = [ -- cgit v1.2.3