Browse Source

SONAR-13599 Remove scope from Rules

tags/8.5.0.37579
Philippe Perrin 3 years ago
parent
commit
bc10c18c1d

+ 1
- 19
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx View File

@@ -24,7 +24,6 @@ import Dropdown from 'sonar-ui-common/components/controls/Dropdown';
import Tooltip from 'sonar-ui-common/components/controls/Tooltip';
import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon';
import LinkIcon from 'sonar-ui-common/components/icons/LinkIcon';
import RuleScopeIcon from 'sonar-ui-common/components/icons/RuleScopeIcon';
import DateFormatter from 'sonar-ui-common/components/intl/DateFormatter';
import { PopupPlacement } from 'sonar-ui-common/components/ui/popups';
import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
@@ -197,18 +196,6 @@ export default class RuleDetailsMeta extends React.PureComponent<Props> {
);
};

renderScope = () => {
const scope = this.props.ruleDetails.scope || 'MAIN';
return (
<Tooltip overlay={translate('coding_rules.scope.title')}>
<li className="coding-rules-detail-property">
<RuleScopeIcon className="little-spacer-right" />
{translate('coding_rules.scope', scope)}
</li>
</Tooltip>
);
};

renderExternalBadge = () => {
const { ruleDetails } = this.props;
if (!ruleDetails.repo) {
@@ -265,12 +252,7 @@ export default class RuleDetailsMeta extends React.PureComponent<Props> {
<ul className="coding-rules-detail-properties">
{this.renderType()}
{this.renderSeverity()}
{!ruleDetails.isExternal && (
<>
{this.renderStatus()}
{this.renderScope()}
</>
)}
{!ruleDetails.isExternal && this.renderStatus()}
{this.renderTags()}
{!ruleDetails.isExternal && this.renderCreationDate()}
{this.renderRepository()}

+ 0
- 12
server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsMeta-test.tsx.snap View File

@@ -88,18 +88,6 @@ exports[`should display right meta info 1`] = `
/>
</li>
</Tooltip>
<Tooltip
overlay="coding_rules.scope.title"
>
<li
className="coding-rules-detail-property"
>
<RuleScopeIcon
className="little-spacer-right"
/>
coding_rules.scope.MAIN
</li>
</Tooltip>
<li
className="coding-rules-detail-property"
data-meta="tags"

+ 0
- 5
sonar-core/src/main/resources/org/sonar/l10n/core.properties View File

@@ -1667,11 +1667,6 @@ coding_rules.remediation_function.coeff=Coeff
coding_rules.remediation_function.offset=Offset
coding_rules.remediation_function.constant=Constant

coding_rules.scope.title=Analysis Scope
coding_rules.scope.MAIN=Main sources
coding_rules.scope.TEST=Test sources
coding_rules.scope.ALL=Main and Test sources

coding_rules.external_rule.engine=Rule provided by an external rule engine: {0}

#------------------------------------------------------------------------------

Loading…
Cancel
Save