-
Notifications
You must be signed in to change notification settings - Fork 684
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SONARJAVA-2202 Update rule description and bug/code smell (#1368)
- Loading branch information
Showing
50 changed files
with
160 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
java-checks/src/main/resources/org/sonar/l10n/java/rules/squid/S1116_java.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
{ | ||
"title": "Empty statements should be removed", | ||
"type": "BUG", | ||
"type": "CODE_SMELL", | ||
"status": "ready", | ||
"remediation": { | ||
"func": "Constant\/Issue", | ||
"constantCost": "2min" | ||
}, | ||
"tags": [ | ||
"bug", | ||
"misra", | ||
"cert", | ||
"unused" | ||
], | ||
"standards": [ | ||
"CERT" | ||
], | ||
"defaultSeverity": "Minor" | ||
"defaultSeverity": "Critical" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
"constantCost": "1min" | ||
}, | ||
"tags": [ | ||
"convention" | ||
"style" | ||
], | ||
"defaultSeverity": "Minor" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
java-checks/src/main/resources/org/sonar/l10n/java/rules/squid/S1147_java.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
java-checks/src/main/resources/org/sonar/l10n/java/rules/squid/S1149_java.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
{ | ||
"title": "Synchronized classes Vector, Hashtable, Stack and StringBuffer should not be used", | ||
"type": "BUG", | ||
"type": "CODE_SMELL", | ||
"status": "ready", | ||
"remediation": { | ||
"func": "Constant\/Issue", | ||
"constantCost": "20min" | ||
}, | ||
"tags": [ | ||
"performance", | ||
"bug" | ||
"performance" | ||
], | ||
"defaultSeverity": "Major" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
"constantCost": "2min" | ||
}, | ||
"tags": [ | ||
"bug", | ||
"clumsy" | ||
], | ||
"defaultSeverity": "Minor" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 4 additions & 7 deletions
11
java-checks/src/main/resources/org/sonar/l10n/java/rules/squid/S1226_java.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
java-checks/src/main/resources/org/sonar/l10n/java/rules/squid/S1226_java.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
java-checks/src/main/resources/org/sonar/l10n/java/rules/squid/S1264_java.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,5 @@ | |
"tags": [ | ||
"brain-overload" | ||
], | ||
"defaultSeverity": "Major" | ||
"defaultSeverity": "Minor" | ||
} |
3 changes: 3 additions & 0 deletions
3
java-checks/src/main/resources/org/sonar/l10n/java/rules/squid/S1541_java.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
<p>The cyclomatic complexity of methods should not exceed a defined threshold.</p> | ||
<p>Complex code can perform poorly and will in any case be difficult to understand and therefore to maintain.</p> | ||
<h2>Exceptions</h2> | ||
<p>While having a large number of fields in a class may indicate that it should be split, this rule nonetheless ignores high complexity in | ||
<code>equals</code> and <code>hashCode</code> methods.</p> | ||
|
5 changes: 2 additions & 3 deletions
5
java-checks/src/main/resources/org/sonar/l10n/java/rules/squid/S1640_java.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
{ | ||
"title": "Maps with keys that are enum values should be replaced with EnumMap", | ||
"type": "BUG", | ||
"type": "CODE_SMELL", | ||
"status": "ready", | ||
"remediation": { | ||
"func": "Constant\/Issue", | ||
"constantCost": "5min" | ||
}, | ||
"tags": [ | ||
"performance", | ||
"bug" | ||
"performance" | ||
], | ||
"defaultSeverity": "Minor" | ||
} |
5 changes: 2 additions & 3 deletions
5
java-checks/src/main/resources/org/sonar/l10n/java/rules/squid/S1641_java.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
{ | ||
"title": "Sets with elements that are enum values should be replaced with EnumSet", | ||
"type": "BUG", | ||
"type": "CODE_SMELL", | ||
"status": "ready", | ||
"remediation": { | ||
"func": "Constant\/Issue", | ||
"constantCost": "5min" | ||
}, | ||
"tags": [ | ||
"performance", | ||
"bug" | ||
"performance" | ||
], | ||
"defaultSeverity": "Minor" | ||
} |
5 changes: 2 additions & 3 deletions
5
java-checks/src/main/resources/org/sonar/l10n/java/rules/squid/S1643_java.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
{ | ||
"title": "Strings should not be concatenated using '+' in a loop", | ||
"type": "BUG", | ||
"type": "CODE_SMELL", | ||
"status": "ready", | ||
"remediation": { | ||
"func": "Constant\/Issue", | ||
"constantCost": "10min" | ||
}, | ||
"tags": [ | ||
"performance", | ||
"bug" | ||
"performance" | ||
], | ||
"defaultSeverity": "Minor" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
"constantCost": "3min" | ||
}, | ||
"tags": [ | ||
"bug", | ||
"cert" | ||
], | ||
"defaultSeverity": "Major" | ||
|
9 changes: 0 additions & 9 deletions
9
java-checks/src/main/resources/org/sonar/l10n/java/rules/squid/S1815_java.html
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
java-checks/src/main/resources/org/sonar/l10n/java/rules/squid/S1815_java.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
java-checks/src/main/resources/org/sonar/l10n/java/rules/squid/S1943_java.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.