Skip to content

Commit 417223f

Browse files
SONARJAVA-5516 Update external rules (#5102)
1 parent f3721e7 commit 417223f

2 files changed

Lines changed: 84 additions & 36 deletions

File tree

external-reports/src/main/resources/org/sonar/l10n/java/rules/spotbugs/findsecbugs-rules.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@
313313
},
314314
{
315315
"key": "NORMALIZATION_AFTER_VALIDATION",
316-
"name": "String is normalzied after validation and not before it",
316+
"name": "String is normalized after validation and not before it",
317317
"type": "VULNERABILITY",
318318
"url": "https://find-sec-bugs.github.io/bugs.htm#NORMALIZATION_AFTER_VALIDATION"
319319
},

external-reports/src/main/resources/org/sonar/l10n/java/rules/spotbugs/spotbugs-rules.json

Lines changed: 83 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@
104104
"severity": "MAJOR",
105105
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#bc-impossible-cast"
106106
},
107+
{
108+
"key": "BC_NULL_INSTANCEOF",
109+
"name": "Correctness - A known null value is checked to see if it is an instance of a type",
110+
"type": "BUG",
111+
"severity": "MAJOR",
112+
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#bc-null-instanceof",
113+
"comment": "LEGACY RULE, do not remove"
114+
},
107115
{
108116
"key": "BC_IMPOSSIBLE_CAST_PRIMITIVE_ARRAY",
109117
"name": "Correctness - Impossible cast involving primitive array",
@@ -132,13 +140,6 @@
132140
"severity": "MAJOR",
133141
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#bc-impossible-instanceof"
134142
},
135-
{
136-
"key": "BC_NULL_INSTANCEOF",
137-
"name": "Correctness - A known null value is checked to see if it is an instance of a type",
138-
"type": "BUG",
139-
"severity": "MAJOR",
140-
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#bc-null-instanceof"
141-
},
142143
{
143144
"key": "BC_UNCONFIRMED_CAST",
144145
"name": "Style - Unchecked/unconfirmed cast",
@@ -195,6 +196,14 @@
195196
"severity": "MAJOR",
196197
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#bit-ior-of-signed-byte"
197198
},
199+
{
200+
"key": "BRSA_BAD_RESULTSET_ACCESS",
201+
"name": "Correctness - Method attempts to access a result set field with index 0",
202+
"type": "BUG",
203+
"severity": "MAJOR",
204+
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#brsa-bad-resultset-access",
205+
"comment": "LEGACY RULE, do not remove"
206+
},
198207
{
199208
"key": "BIT_SIGNED_CHECK",
200209
"name": "Bad practice - Check for sign of bitwise operation",
@@ -216,13 +225,6 @@
216225
"severity": "MAJOR",
217226
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#boa-badly-overridden-adapter"
218227
},
219-
{
220-
"key": "BRSA_BAD_RESULTSET_ACCESS",
221-
"name": "Correctness - Method attempts to access a result set field with index 0",
222-
"type": "BUG",
223-
"severity": "MAJOR",
224-
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#brsa-bad-resultset-access"
225-
},
226228
{
227229
"key": "BSHIFT_WRONG_ADD_PRIORITY",
228230
"name": "Correctness - Possible bad parsing of shift operation",
@@ -1595,6 +1597,14 @@
15951597
"severity": "MAJOR",
15961598
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#jcip-field-isnt-final-in-immutable-class"
15971599
},
1600+
{
1601+
"key": "LI_LAZY_INIT_INSTANCE",
1602+
"name": "Multi-threading - Incorrect lazy initialization of instance field",
1603+
"type": "BUG",
1604+
"severity": "MAJOR",
1605+
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#li-lazy-init-instance",
1606+
"comment": "LEGACY RULE, do not remove"
1607+
},
15981608
{
15991609
"key": "JLM_JSR166_LOCK_MONITORENTER",
16001610
"name": "Multi-threading - Synchronization performed on Lock",
@@ -1630,13 +1640,6 @@
16301640
"severity": "MAJOR",
16311641
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#lg-lost-logger-due-to-weak-reference"
16321642
},
1633-
{
1634-
"key": "LI_LAZY_INIT_INSTANCE",
1635-
"name": "Multi-threading - Incorrect lazy initialization of instance field",
1636-
"type": "BUG",
1637-
"severity": "MAJOR",
1638-
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#li-lazy-init-instance"
1639-
},
16401643
{
16411644
"key": "LI_LAZY_INIT_STATIC",
16421645
"name": "Multi-threading - Incorrect lazy initialization of static field",
@@ -2295,6 +2298,14 @@
22952298
"severity": "MAJOR",
22962299
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#pa-public-array-attribute"
22972300
},
2301+
{
2302+
"key": "PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_INNER_CLASS_NAMES",
2303+
"name": "Bad practice - Do not reuse public identifiers from JSL as inner name",
2304+
"type": "CODE_SMELL",
2305+
"severity": "MAJOR",
2306+
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#pi-do-not-reuse-public-identifiers-inner-class-names",
2307+
"comment": "LEGACY RULE, do not remove"
2308+
},
22982309
{
22992310
"key": "PA_PUBLIC_MUTABLE_OBJECT_ATTRIBUTE",
23002311
"name": "Bad practice - Mutable object-type field is public",
@@ -2393,6 +2404,14 @@
23932404
"severity": "MAJOR",
23942405
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#qf-questionable-for-loop"
23952406
},
2407+
{
2408+
"key": "RCN_REDUNDANT_CHECKED_NULL_COMPARISON",
2409+
"name": "Style - Redundant comparison to null of previously checked value",
2410+
"type": "CODE_SMELL",
2411+
"severity": "MAJOR",
2412+
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#rcn-redundant-checked-null-comparison",
2413+
"comment": "LEGACY RULE, do not remove"
2414+
},
23962415
{
23972416
"key": "RANGE_ARRAY_INDEX",
23982417
"name": "Correctness - Array index is out of bounds",
@@ -2421,13 +2440,6 @@
24212440
"severity": "MAJOR",
24222441
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#range-string-index"
24232442
},
2424-
{
2425-
"key": "RCN_REDUNDANT_CHECKED_NULL_COMPARISON",
2426-
"name": "Style - Redundant comparison to null of previously checked value",
2427-
"type": "CODE_SMELL",
2428-
"severity": "MAJOR",
2429-
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#rcn-redundant-checked-null-comparison"
2430-
},
24312443
{
24322444
"key": "RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE",
24332445
"name": "Style - Redundant comparison of non-null value to null",
@@ -3093,6 +3105,14 @@
30933105
"severity": "MAJOR",
30943106
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#st-write-to-static-from-instance-method"
30953107
},
3108+
{
3109+
"key": "TLW_TWO_LOCK_NOTIFY",
3110+
"name": "Multi-threading - Notify with two locks held",
3111+
"type": "BUG",
3112+
"severity": "MAJOR",
3113+
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#tlw-two-lock-notify",
3114+
"comment": "LEGACY RULE, do not remove"
3115+
},
30963116
{
30973117
"key": "SWL_SLEEP_WITH_LOCK_HELD",
30983118
"name": "Multi-threading - Method calls Thread.sleep() with a lock held",
@@ -3156,13 +3176,6 @@
31563176
"severity": "MAJOR",
31573177
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#throws-method-throws-runtimeexception"
31583178
},
3159-
{
3160-
"key": "TLW_TWO_LOCK_NOTIFY",
3161-
"name": "Multi-threading - Notify with two locks held",
3162-
"type": "BUG",
3163-
"severity": "MAJOR",
3164-
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#tlw-two-lock-notify"
3165-
},
31663179
{
31673180
"key": "TLW_TWO_LOCK_WAIT",
31683181
"name": "Multi-threading - Wait with two locks held",
@@ -3380,6 +3393,41 @@
33803393
"severity": "MAJOR",
33813394
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#usm-useless-subclass-method"
33823395
},
3396+
{
3397+
"key": "US_USELESS_SUPPRESSION_ON_CLASS",
3398+
"name": "Style - Useless suppression on a class",
3399+
"type": "CODE_SMELL",
3400+
"severity": "MAJOR",
3401+
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#us-useless-suppression-on-class"
3402+
},
3403+
{
3404+
"key": "US_USELESS_SUPPRESSION_ON_FIELD",
3405+
"name": "Style - Useless suppression on a field",
3406+
"type": "CODE_SMELL",
3407+
"severity": "MAJOR",
3408+
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#us-useless-suppression-on-field"
3409+
},
3410+
{
3411+
"key": "US_USELESS_SUPPRESSION_ON_METHOD",
3412+
"name": "Style - Useless suppression on a method",
3413+
"type": "CODE_SMELL",
3414+
"severity": "MAJOR",
3415+
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#us-useless-suppression-on-method"
3416+
},
3417+
{
3418+
"key": "US_USELESS_SUPPRESSION_ON_METHOD_PARAMETER",
3419+
"name": "Style - Useless suppression on a method parameter",
3420+
"type": "CODE_SMELL",
3421+
"severity": "MAJOR",
3422+
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#us-useless-suppression-on-method-parameter"
3423+
},
3424+
{
3425+
"key": "US_USELESS_SUPPRESSION_ON_PACKAGE",
3426+
"name": "Style - Useless suppression on a package",
3427+
"type": "CODE_SMELL",
3428+
"severity": "MAJOR",
3429+
"url": "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#us-useless-suppression-on-package"
3430+
},
33833431
{
33843432
"key": "UUF_UNUSED_FIELD",
33853433
"name": "Performance - Unused field",

0 commit comments

Comments
 (0)