Skip to content

Commit c045a29

Browse files
irina-batinic-sonarsourceWohops
authored andcommitted
Update rules metadata
1 parent e06a47f commit c045a29

8 files changed

Lines changed: 20 additions & 20 deletions

File tree

sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/S3749.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<h2>Why is this an issue?</h2>
2-
<p>Spring <code>@Component</code>, <code>@Controller</code>, <code>@Service</code>, and <code>@Repository</code> classes are singletons by default,
3-
meaning only one instance of the class is ever instantiated in the application. Typically such a class might have a few <code>static</code> members,
4-
such as a logger, but all non-<code>static</code> members should be managed by Spring.</p>
5-
<p>This rule raises an issue when a singleton <code>@Component</code>, <code>@Controller</code>, <code>@Service</code>, or <code>@Repository</code>,
6-
not annotated with <code>@ConfigurationProperties</code>, has non-<code>static</code> members that are not annotated with one of:</p>
2+
<p>Spring <code>@Component</code>, <code>@Controller</code>, <code>@RestController</code>,<code>@Service</code>, and <code>@Repository</code> classes
3+
are singletons by default, meaning only one instance of the class is ever instantiated in the application. Typically such a class might have a few
4+
<code>static</code> members, such as a logger, but all non-<code>static</code> members should be managed by Spring.</p>
5+
<p>This rule raises an issue when a singleton <code>@Component</code>, <code>@Controller</code>, <code>@RestController</code>, <code>@Service</code>,
6+
or <code>@Repository</code>, not annotated with <code>@ConfigurationProperties</code>, has non-<code>static</code> members that are not annotated with
7+
one of:</p>
78
<ul>
89
<li> <code>org.springframework.beans.factory.annotation.Autowired</code> </li>
910
<li> <code>org.springframework.beans.factory.annotation.Value</code> </li>

sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/S4551.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ <h3>Compliant solution</h3>
3737
</pre>
3838
<h2>Resources</h2>
3939
<ul>
40-
<li> <a href="https://www.javaworld.com/article/2074292/core-java/use-----or-----to-compare-java-enums.html">Use == (or !=) to Compare Java
41-
Enums</a> </li>
40+
<li> <a href="https://www.infoworld.com/article/2074292/use-----or-----to-compare-java-enums.html">Use == (or !=) to Compare Java Enums</a> </li>
4241
</ul>
4342

sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/S4792.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<p>This rule is deprecated, and will eventually be removed.</p>
12
<p>Configuring loggers is security-sensitive. It has led in the past to the following vulnerabilities:</p>
23
<ul>
34
<li> <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-0285">CVE-2018-0285</a> </li>

sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/S4792.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
},
88
"attribute": "CONVENTIONAL"
99
},
10-
"status": "ready",
11-
"tags": [
12-
"cwe"
13-
],
10+
"status": "deprecated",
11+
"tags": [],
1412
"defaultSeverity": "Critical",
1513
"ruleSpecification": "RSPEC-4792",
1614
"sqKey": "S4792",

sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/S5973.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<h2>Why is this an issue?</h2>
22
<p>Unstable / flaky tests are tests which sometimes pass and sometimes fail, without any code change. Obviously, they slow down developments when
3-
engineers have to rerun failed tests. However the real problem is that you can’t completely trust these tests, they might fail for many different
3+
developers have to rerun failed tests. However, the real problem is that you can’t completely trust these tests, they might fail for many different
44
reasons and you don’t know if any of them will happen in production.</p>
5-
<p>Some tools, such as TestNG, enable developers to automatically retry flaky tests. This might be ok as a temporary solution, but it should
6-
definitely be fixed. The more flaky tests you add, the more chances there are for a bug to arrive in production.</p>
5+
<p>Some tools, such as TestNG, enable developers to automatically retry flaky tests. This might be acceptable as a temporary solution, but it should
6+
eventually be fixed. The more flaky tests you add, the more chances there are for a bug to arrive in production.</p>
77
<p>This rule raises an issue when the annotation <code>org.testng.annotations.Test</code> is given a <code>successPercentage</code> argument with a
88
value lower than <code>100</code>.</p>
99
<h3>Noncompliant code example</h3>
@@ -18,8 +18,9 @@ <h3>Noncompliant code example</h3>
1818
</pre>
1919
<h2>Resources</h2>
2020
<ul>
21-
<li> <a href="https://testng.org/doc/documentation-main.html#annotations">TestNG documentation - Annotations</a> </li>
22-
<li> <a href="https://engineering.atspotify.com/2019/11/18/test-flakiness-methods-for-identifying-and-dealing-with-flaky-tests/">Test Flakiness -
23-
Methods for identifying and dealing with flaky tests</a> </li>
21+
<li> TestNG documentation - <a href="https://testng.org/doc/documentation-main.html#annotations">Annotations</a> </li>
22+
<li> Spotify Engineering - <a
23+
href="https://engineering.atspotify.com/2019/11/18/test-flakiness-methods-for-identifying-and-dealing-with-flaky-tests/">Test Flakiness - Methods
24+
for identifying and dealing with flaky tests</a> </li>
2425
</ul>
2526

sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/S5973.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"type": "CODE_SMELL",
44
"code": {
55
"impacts": {
6-
"MAINTAINABILITY": "MEDIUM"
6+
"MAINTAINABILITY": "MEDIUM",
7+
"RELIABILITY": "MEDIUM"
78
},
89
"attribute": "TESTED"
910
},

sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/Sonar_way_profile.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@
342342
"S4719",
343343
"S4738",
344344
"S4790",
345-
"S4792",
346345
"S4830",
347346
"S4838",
348347
"S4925",

sonarpedia.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"languages": [
44
"JAVA"
55
],
6-
"latest-update": "2023-11-24T15:20:38.530699Z",
6+
"latest-update": "2023-12-18T09:12:31.787089Z",
77
"options": {
88
"no-language-in-filenames": true,
99
"preserve-filenames": false

0 commit comments

Comments
 (0)