-
Notifications
You must be signed in to change notification settings - Fork 688
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SONARJAVA-4499 Update rules metadata (#4392)
* SONARJAVA-4499 Update rules metadata, rename sections * SONARJAVA-4499 Update rules metadata, deprecated rules * SONARJAVA-4499 Update rules metadata, "See Also" sections * SONARJAVA-4499 S2384 description updated to match the implementation * SONARJAVA-4499 Fix S2755 rule description invalid section * SONARJAVA-4499 Migrate S3981 rule description to the educational format
- Loading branch information
1 parent
48fa169
commit b40c64f
Showing
588 changed files
with
1,944 additions
and
1,364 deletions.
There are no files selected for viewing
7 changes: 4 additions & 3 deletions
7
java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S100.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
5 changes: 3 additions & 2 deletions
5
java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S101.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
1 change: 1 addition & 0 deletions
1
java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S103.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,2 +1,3 @@ | ||
<h2>Why is this an issue?</h2> | ||
<p>Having to scroll horizontally makes it harder to get a quick overview and understanding of any piece of code.</p> | ||
|
1 change: 1 addition & 0 deletions
1
java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S104.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
1 change: 1 addition & 0 deletions
1
java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S105.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,4 @@ | ||
<h2>Why is this an issue?</h2> | ||
<p>Developers should not need to configure the tab width of their text editors in order to be able to read source code.</p> | ||
<p>So the use of the tabulation character must be banned.</p> | ||
|
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
5 changes: 3 additions & 2 deletions
5
java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1066.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
7 changes: 4 additions & 3 deletions
7
java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1067.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,16 +1,17 @@ | ||
<h2>Why is this an issue?</h2> | ||
<p>The complexity of an expression is defined by the number of <code>&&</code>, <code>||</code> and <code>condition ? ifTrue : ifFalse</code> | ||
operators it contains.</p> | ||
<p>A single expression’s complexity should not become too high to keep the code readable.</p> | ||
<h2>Noncompliant Code Example</h2> | ||
<h3>Noncompliant code example</h3> | ||
<p>With the default threshold value of 3:</p> | ||
<pre> | ||
if (((condition1 && condition2) || (condition3 && condition4)) && condition5) { ... } | ||
</pre> | ||
<h2>Compliant Solution</h2> | ||
<h3>Compliant solution</h3> | ||
<pre> | ||
if ( (myFirstCondition() || mySecondCondition()) && myLastCondition()) { ... } | ||
</pre> | ||
<h2>Exceptions</h2> | ||
<h3>Exceptions</h3> | ||
<p>No issue is reported inside <code>equals</code> methods, because it is common to compare all the fields of a class for equality inside this kind of | ||
method.</p> | ||
|
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
7 changes: 4 additions & 3 deletions
7
java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S107.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
5 changes: 3 additions & 2 deletions
5
java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S108.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,9 +1,10 @@ | ||
<h2>Why is this an issue?</h2> | ||
<p>Most of the time a block of code is empty when a piece of code is really missing. So such empty block must be either filled or removed.</p> | ||
<h2>Noncompliant Code Example</h2> | ||
<h3>Noncompliant code example</h3> | ||
<pre> | ||
for (int i = 0; i < 42; i++){} // Empty on purpose or missing piece of code ? | ||
</pre> | ||
<h2>Exceptions</h2> | ||
<h3>Exceptions</h3> | ||
<p>When a block contains a comment, this block is not considered to be empty unless it is a <code>synchronized</code> block. <code>synchronized</code> | ||
blocks are still considered empty even with comments because they can still affect program flow.</p> | ||
|
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
1 change: 1 addition & 0 deletions
1
java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S110.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
7 changes: 4 additions & 3 deletions
7
java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1105.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
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.