'sysTags',
'tags',
'type',
+ 'cleanCodeAttributeCategory',
+ 'cleanCodeAttribute',
+ 'impacts',
])
);
}
import { RequestData } from '../../helpers/request';
import { getStandards } from '../../helpers/security-standard';
import { mockLoggedInUser, mockPaging, mockRuleDetails } from '../../helpers/testMocks';
+import {
+ CleanCodeAttributeCategory,
+ SoftwareImpactSeverity,
+ SoftwareQuality,
+} from '../../types/clean-code-taxonomy';
import { SearchRulesResponse } from '../../types/coding-rules';
import {
ASSIGNEE_ME,
- CleanCodeAttributeCategory,
IssueResolution,
IssueStatus,
IssueTransition,
RawIssue,
RawIssuesResponse,
ReferencedComponent,
- SoftwareImpactSeverity,
- SoftwareQuality,
} from '../../types/issues';
import { SearchRulesQuery } from '../../types/rules';
import { Standards } from '../../types/security';
import { mockLoggedInUser, mockRawIssue } from '../../../helpers/testMocks';
import {
CleanCodeAttributeCategory,
+ SoftwareImpactSeverity,
+ SoftwareQuality,
+} from '../../../types/clean-code-taxonomy';
+import {
IssueActions,
IssueResolution,
IssueScope,
IssueStatus,
IssueType,
RawIssue,
- SoftwareImpactSeverity,
- SoftwareQuality,
} from '../../../types/issues';
import { Dict, FlowType, SnippetsByComponent } from '../../../types/types';
import {
CleanCodeAttributeCategory,
SoftwareImpactSeverity,
SoftwareQuality,
-} from '../../../types/issues';
+} from '../../../types/clean-code-taxonomy';
import { SecurityStandard } from '../../../types/security';
import {
parseQuery,
*/
import * as React from 'react';
-import { CleanCodeAttributeCategory } from '../../../types/issues';
+import { CleanCodeAttributeCategory } from '../../../types/clean-code-taxonomy';
import { CommonProps, SimpleListStyleFacet } from './SimpleListStyleFacet';
interface Props extends CommonProps {
import DocumentationTooltip from '../../../components/common/DocumentationTooltip';
import SoftwareImpactSeverityIcon from '../../../components/icons/SoftwareImpactSeverityIcon';
import { translate } from '../../../helpers/l10n';
-import { SoftwareImpactSeverity } from '../../../types/issues';
+import { SoftwareImpactSeverity } from '../../../types/clean-code-taxonomy';
import { CommonProps, SimpleListStyleFacet } from './SimpleListStyleFacet';
interface Props extends CommonProps {
*/
import * as React from 'react';
-import { SoftwareQuality } from '../../../types/issues';
+import { SoftwareQuality } from '../../../types/clean-code-taxonomy';
import { CommonProps, SimpleListStyleFacet } from './SimpleListStyleFacet';
interface Props extends CommonProps {
CleanCodeAttributeCategory,
SoftwareImpactSeverity,
SoftwareQuality,
-} from '../../types/issues';
+} from '../../types/clean-code-taxonomy';
import { Component } from '../../types/types';
import { NoticeType } from '../../types/users';
import IssuesApp from './components/IssuesApp';
import { isDefined } from '../../helpers/types';
import {
CleanCodeAttributeCategory,
- Facet,
- RawFacet,
SoftwareImpactSeverity,
SoftwareQuality,
-} from '../../types/issues';
+} from '../../types/clean-code-taxonomy';
+import { Facet, RawFacet } from '../../types/issues';
import { MetricType } from '../../types/metrics';
import { SecurityStandard } from '../../types/security';
import { Dict, Issue, Paging, RawQuery } from '../../types/types';
} from 'design-system';
import * as React from 'react';
import { translate } from '../../helpers/l10n';
-import { SoftwareImpactSeverity } from '../../types/issues';
+import { SoftwareImpactSeverity } from '../../types/clean-code-taxonomy';
import { Dict } from '../../types/types';
import { IconProps } from './Icon';
import { Pill } from 'design-system';
import React from 'react';
import { translate } from '../../helpers/l10n';
-import { CleanCodeAttribute, CleanCodeAttributeCategory } from '../../types/issues';
+import { CleanCodeAttribute, CleanCodeAttributeCategory } from '../../types/clean-code-taxonomy';
import DocumentationTooltip from '../common/DocumentationTooltip';
export interface Props {
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { translate } from '../../helpers/l10n';
-import { SoftwareImpactSeverity, SoftwareQuality } from '../../types/issues';
+import { SoftwareImpactSeverity, SoftwareQuality } from '../../types/clean-code-taxonomy';
import DocumentationTooltip from '../common/DocumentationTooltip';
import SoftwareImpactSeverityIcon from '../icons/SoftwareImpactSeverityIcon';
import { LogsLevels } from '../apps/system/utils';
import { Location, Router } from '../components/hoc/withRouter';
import { AppState } from '../types/appstate';
-import { RuleRepository } from '../types/coding-rules';
-import { EditionKey } from '../types/editions';
import {
CleanCodeAttribute,
CleanCodeAttributeCategory,
- IssueScope,
- IssueSeverity,
- IssueStatus,
- IssueType,
- RawIssue,
SoftwareImpactSeverity,
SoftwareQuality,
-} from '../types/issues';
+} from '../types/clean-code-taxonomy';
+import { RuleRepository } from '../types/coding-rules';
+import { EditionKey } from '../types/editions';
+import { IssueScope, IssueSeverity, IssueStatus, IssueType, RawIssue } from '../types/issues';
import { Language } from '../types/languages';
import { Notification } from '../types/notifications';
import { DumpStatus, DumpTask } from '../types/project-dump';
export function mockRuleDetails(overrides: Partial<RuleDetails> = {}): RuleDetails {
return {
+ cleanCodeAttributeCategory: CleanCodeAttributeCategory.Adaptable,
+ cleanCodeAttribute: CleanCodeAttribute.Clear,
key: 'squid:S1337',
repo: 'squid',
name: '".equals()" should not be used to test the values of "Atomic" classes',
severity: 'MAJOR',
status: 'READY',
isTemplate: false,
+ impacts: [
+ { softwareQuality: SoftwareQuality.Maintainability, severity: SoftwareImpactSeverity.High },
+ ],
tags: [],
sysTags: ['multi-threading'],
lang: 'java',
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2023 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+export enum SoftwareImpactSeverity {
+ High = 'HIGH',
+ Medium = 'MEDIUM',
+ Low = 'LOW',
+}
+
+export enum CleanCodeAttributeCategory {
+ Consistent = 'CONSISTENT',
+ Intentional = 'INTENTIONAL',
+ Adaptable = 'ADAPTABLE',
+ Responsible = 'RESPONSIBLE',
+}
+
+export enum CleanCodeAttribute {
+ Clear = 'CLEAR',
+ Complete = 'COMPLETE',
+ Conventional = 'CONVENTIONAL',
+ Distinct = 'DISTINCT',
+ Efficient = 'EFFICIENT',
+ Focused = 'FOCUSED',
+ Formatted = 'FORMATTED',
+ Identifiable = 'IDENTIFIABLE',
+ Lawful = 'LAWFUL',
+ Logical = 'LOGICAL',
+ Modular = 'MODULAR',
+ Respectful = 'RESPECTFUL',
+ Tested = 'TESTED',
+ Trustworthy = 'TRUSTWORTHY',
+}
+
+export enum SoftwareQuality {
+ Security = 'SECURITY',
+ Reliability = 'RELIABILITY',
+ Maintainability = 'MAINTAINABILITY',
+}
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import {
+ CleanCodeAttribute,
+ CleanCodeAttributeCategory,
+ SoftwareImpactSeverity,
+ SoftwareQuality,
+} from './clean-code-taxonomy';
import { Issue, Paging, TextRange } from './types';
import { UserBase } from './users';
}
// Keep this enum in the correct order (most severe to least severe).
-export enum SoftwareImpactSeverity {
- High = 'HIGH',
- Medium = 'MEDIUM',
- Low = 'LOW',
-}
export enum IssueSeverity {
Blocker = 'BLOCKER',
Info = 'INFO',
}
-export enum CleanCodeAttributeCategory {
- Consistent = 'CONSISTENT',
- Intentional = 'INTENTIONAL',
- Adaptable = 'ADAPTABLE',
- Responsible = 'RESPONSIBLE',
-}
-
-export enum CleanCodeAttribute {
- Clear = 'CLEAR',
- Complete = 'COMPLETE',
- Conventional = 'CONVENTIONAL',
- Distinct = 'DISTINCT',
- Efficient = 'EFFICIENT',
- Focused = 'FOCUSED',
- Formatted = 'FORMATTED',
- Identifiable = 'IDENTIFIABLE',
- Lawful = 'LAWFUL',
- Logical = 'LOGICAL',
- Modular = 'MODULAR',
- Respectful = 'RESPECTFUL',
- Tested = 'TESTED',
- Trustworthy = 'TRUSTWORTHY',
-}
-
-export enum SoftwareQuality {
- Security = 'SECURITY',
- Reliability = 'RELIABILITY',
- Maintainability = 'MAINTAINABILITY',
-}
-
export enum IssueScope {
Main = 'MAIN',
Test = 'TEST',
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { RuleDescriptionSection } from '../apps/coding-rules/rule';
-import { ComponentQualifier, Visibility } from './component';
import {
CleanCodeAttribute,
CleanCodeAttributeCategory,
- MessageFormatting,
SoftwareImpactSeverity,
SoftwareQuality,
-} from './issues';
+} from './clean-code-taxonomy';
+import { ComponentQualifier, Visibility } from './component';
+import { MessageFormatting } from './issues';
import { NewCodeDefinitionType } from './new-code-definition';
import { UserActive, UserBase } from './users';
export type RawQuery = Dict<any>;
export interface Rule {
+ cleanCodeAttributeCategory: CleanCodeAttributeCategory;
+ cleanCodeAttribute: CleanCodeAttribute;
+ impacts: Array<{
+ softwareQuality: SoftwareQuality;
+ severity: SoftwareImpactSeverity;
+ }>;
isTemplate?: boolean;
key: string;
lang?: string;