Skip to content

Commit c877f85

Browse files
authored
SONARHTML-175 Update rule metadata with clean code taxonomy attributes (#249)
1 parent 1465444 commit c877f85

32 files changed

+190
-10
lines changed

sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/AvoidCommentedOutCodeCheck.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "Sections of code should not be commented out",
33
"type": "CODE_SMELL",
4+
"code": {
5+
"impacts": {
6+
"MAINTAINABILITY": "MEDIUM"
7+
},
8+
"attribute": "CLEAR"
9+
},
410
"status": "ready",
511
"remediation": {
612
"func": "Constant\/Issue",

sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/DoubleQuotesCheck.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "Attributes should be quoted using double quotes rather than single ones",
33
"type": "CODE_SMELL",
4+
"code": {
5+
"impacts": {
6+
"MAINTAINABILITY": "LOW"
7+
},
8+
"attribute": "CONVENTIONAL"
9+
},
410
"status": "ready",
511
"remediation": {
612
"func": "Constant\/Issue",
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<h2>Why is this an issue?</h2>
2-
<p>A source file that grows too much tends to aggregate too many responsibilities and inevitably becomes harder to understand and, therefore, to
3-
maintain.</p>
2+
<p>When a source file grows too much, it can accumulate numerous responsibilities and become challenging to understand and maintain.</p>
43
<p>Above a specific threshold, refactor the file into smaller files whose code focuses on well-defined tasks. Those smaller files will be easier to
5-
understand and easier to test.</p>
4+
understand and test.</p>
65

sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/FileLengthCheck.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "Files should not have too many lines",
33
"type": "CODE_SMELL",
4+
"code": {
5+
"impacts": {
6+
"MAINTAINABILITY": "MEDIUM"
7+
},
8+
"attribute": "FOCUSED"
9+
},
410
"status": "ready",
511
"remediation": {
612
"func": "Constant\/Issue",

sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/HeaderCheck.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "Track lack of copyright and license headers",
33
"type": "CODE_SMELL",
4+
"code": {
5+
"impacts": {
6+
"MAINTAINABILITY": "HIGH"
7+
},
8+
"attribute": "LAWFUL"
9+
},
410
"status": "ready",
511
"remediation": {
612
"func": "Constant\/Issue",

sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/IllegalNamespaceCheck.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "Track uses of disallowed namespaces in XHTML documents",
33
"type": "CODE_SMELL",
4+
"code": {
5+
"impacts": {
6+
"MAINTAINABILITY": "MEDIUM"
7+
},
8+
"attribute": "CONVENTIONAL"
9+
},
410
"status": "ready",
511
"remediation": {
612
"func": "Constant\/Issue",

sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/IllegalTabCheck.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "Tabulation characters should not be used",
33
"type": "CODE_SMELL",
4+
"code": {
5+
"impacts": {
6+
"MAINTAINABILITY": "LOW"
7+
},
8+
"attribute": "FORMATTED"
9+
},
410
"status": "ready",
511
"remediation": {
612
"func": "Constant\/Issue",

sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/ImgWithoutAltCheck.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "Image, area and button with image tags should have an \"alt\" attribute",
33
"type": "BUG",
4+
"code": {
5+
"impacts": {
6+
"RELIABILITY": "LOW"
7+
},
8+
"attribute": "COMPLETE"
9+
},
410
"status": "ready",
511
"remediation": {
612
"func": "Constant\/Issue",

sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/LongJavaScriptCheck.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "Javascript scriptlets should not have too many lines of code",
33
"type": "CODE_SMELL",
4+
"code": {
5+
"impacts": {
6+
"MAINTAINABILITY": "MEDIUM"
7+
},
8+
"attribute": "FOCUSED"
9+
},
410
"status": "ready",
511
"remediation": {
612
"func": "Linear",

sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/MaxLineLengthCheck.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "Lines should not be too long",
33
"type": "CODE_SMELL",
4+
"code": {
5+
"impacts": {
6+
"MAINTAINABILITY": "MEDIUM"
7+
},
8+
"attribute": "FORMATTED"
9+
},
410
"status": "ready",
511
"remediation": {
612
"func": "Constant\/Issue",

0 commit comments

Comments
 (0)