Skip to content

Commit b6ce292

Browse files
SONARJAVA-4552 Deprecate rule S6374
* Apply deprecation from rspec * Update ruling tests results because the rule is deprecated and removed from default quality profile
1 parent c9e177c commit b6ce292

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

its/ruling/src/test/java/org/sonar/java/it/AutoScanTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,15 @@ public void javaCheckTestSources() throws Exception {
180180
assertThat(newTotal).isEqualTo(knownTotal);
181181
assertThat(rulesCausingFPs).hasSize(5);
182182
assertThat(rulesNotReporting).hasSize(7);
183-
assertThat(rulesSilenced).hasSize(69);
183+
assertThat(rulesSilenced).hasSize(68);
184184

185185
/**
186186
* 4. Check total number of differences (FPs + FNs)
187187
*
188188
* No differences would mean that we find the same issues with and without the bytecode and libraries
189189
*/
190190
String differences = Files.readString(pathFor(TARGET_ACTUAL + PROJECT_KEY + "-no-binaries_differences"));
191-
assertThat(differences).isEqualTo("Issues differences: 3265");
191+
assertThat(differences).isEqualTo("Issues differences: 3253");
192192
}
193193

194194
private static Path pathFor(String path) {

its/ruling/src/test/resources/autoscan/autoscan-diff-by-rules.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2801,12 +2801,6 @@
28012801
"falseNegatives": 15,
28022802
"falsePositives": 0
28032803
},
2804-
{
2805-
"ruleKey": "S6374",
2806-
"hasTruePositives": false,
2807-
"falseNegatives": 12,
2808-
"falsePositives": 0
2809-
},
28102804
{
28112805
"ruleKey": "S6376",
28122806
"hasTruePositives": false,

java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S6374.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; use {rule:java:S2755} instead.</p>
12
<h2>Why is this an issue?</h2>
23
<p>By default XML processors attempt to load all XML schemas and DTD (their locations are defined with <code>xsi:schemaLocation</code> attributes and
34
<code>DOCTYPE</code> declarations), potentially from an external storage such as file system or network, which may lead, if no restrictions are put in

java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S6374.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"attribute": "CONVENTIONAL"
99
},
10-
"status": "ready",
10+
"status": "deprecated",
1111
"remediation": {
1212
"func": "Constant\/Issue",
1313
"constantCost": "15min"

0 commit comments

Comments
 (0)