aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-web/src/main/js/api/mocks/CodingRulesMock.ts1
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx6
2 files changed, 4 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/api/mocks/CodingRulesMock.ts b/server/sonar-web/src/main/js/api/mocks/CodingRulesMock.ts
index 5214c7e0bb2..f48587748d6 100644
--- a/server/sonar-web/src/main/js/api/mocks/CodingRulesMock.ts
+++ b/server/sonar-web/src/main/js/api/mocks/CodingRulesMock.ts
@@ -120,6 +120,7 @@ export default class CodingRulesMock {
lang: 'py',
langName: 'Python',
name: 'Bad Python rule',
+ isExternal: true,
descriptionSections: undefined
})
];
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx
index 3ccee3eec6d..e8d5d4dcae6 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx
+++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx
@@ -213,9 +213,9 @@ export default class RuleDetailsDescription extends React.PureComponent<Props, S
/>
)}
- {hasDescriptionSection && !defaultSection ? (
- <RuleTabViewer ruleDetails={ruleDetails} />
- ) : (
+ {hasDescriptionSection && !defaultSection && <RuleTabViewer ruleDetails={ruleDetails} />}
+
+ {ruleDetails.isExternal && (
<div className="coding-rules-detail-description rule-desc markdown">
{translateWithParameters('issue.external_issue_description', ruleDetails.name)}
</div>