Skip to content

Commit 3ef14c5

Browse files
committed
SONARFLEX-173 Update rule metadata with clean code taxonomy attributes
1 parent 7674391 commit 3ef14c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+456
-30
lines changed

flex-checks/src/main/resources/org/sonar/l10n/flex/rules/flex/ActionScript2.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "Statements, operators and keywords specific to ActionScript 2 should not be used",
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",

flex-checks/src/main/resources/org/sonar/l10n/flex/rules/flex/CommentRegularExpression.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "Track comments matching a regular expression",
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",

flex-checks/src/main/resources/org/sonar/l10n/flex/rules/flex/CommentedCode.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",

flex-checks/src/main/resources/org/sonar/l10n/flex/rules/flex/FunctionComplexity.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "Cyclomatic Complexity of functions should not be too high",
33
"type": "CODE_SMELL",
4+
"code": {
5+
"impacts": {
6+
"MAINTAINABILITY": "HIGH"
7+
},
8+
"attribute": "FOCUSED"
9+
},
410
"status": "ready",
511
"remediation": {
612
"func": "Linear with offset",

flex-checks/src/main/resources/org/sonar/l10n/flex/rules/flex/FunctionSinglePointOfExit.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "A function should have a single point of exit at the end of the function",
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",

flex-checks/src/main/resources/org/sonar/l10n/flex/rules/flex/LineLength.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",

flex-checks/src/main/resources/org/sonar/l10n/flex/rules/flex/NonEmptyCaseWithoutBreak.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "Switch cases should end with an unconditional \"break\" statement",
33
"type": "CODE_SMELL",
4+
"code": {
5+
"impacts": {
6+
"MAINTAINABILITY": "HIGH"
7+
},
8+
"attribute": "CLEAR"
9+
},
410
"status": "ready",
511
"remediation": {
612
"func": "Constant\/Issue",

flex-checks/src/main/resources/org/sonar/l10n/flex/rules/flex/OneStatementPerLine.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<h2>Why is this an issue?</h2>
2-
<p>For better readability, do not put more than one statement on a single line.</p>
3-
<h3>Noncompliant code example</h3>
2+
<p>Putting multiple statements on a single line lowers the code readability and makes debugging the code more complex.</p>
43
<pre>
5-
if(someCondition) doSomething();
4+
if (someCondition) doSomething(); // Noncompliant
65
</pre>
7-
<h3>Compliant solution</h3>
6+
<p>Write one statement per line to improve readability.</p>
87
<pre>
9-
if(someCondition) {
8+
if (someCondition) {
109
doSomething();
1110
}
1211
</pre>

flex-checks/src/main/resources/org/sonar/l10n/flex/rules/flex/OneStatementPerLine.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "Statements should be on separate lines",
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",

flex-checks/src/main/resources/org/sonar/l10n/flex/rules/flex/S100.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"title": "Function names should comply with a naming convention",
33
"type": "CODE_SMELL",
4+
"code": {
5+
"impacts": {
6+
"MAINTAINABILITY": "LOW"
7+
},
8+
"attribute": "IDENTIFIABLE"
9+
},
410
"status": "ready",
511
"remediation": {
612
"func": "Constant\/Issue",

0 commit comments

Comments
 (0)