Skip to content

Commit

Permalink
SONARPY-2399 update rules tags
Browse files Browse the repository at this point in the history
  • Loading branch information
maksim-grebeniuk-sonarsource committed Dec 3, 2024
1 parent a007e43 commit 45b01ab
Show file tree
Hide file tree
Showing 136 changed files with 364 additions and 93 deletions.
5 changes: 4 additions & 1 deletion rules/S1045/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"title": "All \"except\" blocks should be able to catch exceptions"
"title": "All \"except\" blocks should be able to catch exceptions",
"tags": [
"suspicious"
]
}
4 changes: 4 additions & 0 deletions rules/S1128/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"defaultQualityProfiles": [

],
"tags": [
"convention",
"unused"
]
}
2 changes: 1 addition & 1 deletion rules/S1129/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"constantCost": "2min"
},
"tags": [

"convention"
],
"extra": {
"replacementRules": [
Expand Down
7 changes: 6 additions & 1 deletion rules/S1143/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"title": "Break, continue and return statements should not occur in \"finally\" blocks"
"title": "Break, continue and return statements should not occur in \"finally\" blocks",
"tags": [
"cwe",
"error-handling",
"pitfall"
]
}
5 changes: 4 additions & 1 deletion rules/S1144/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"title": "Unused class-private methods should be removed"
"title": "Unused class-private methods should be removed",
"tags": [
"suspicious"
]
}
5 changes: 4 additions & 1 deletion rules/S1226/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"title": "Function parameters initial values should not be ignored"
"title": "Function parameters initial values should not be ignored",
"tags": [
"suspicious"
]
}
5 changes: 4 additions & 1 deletion rules/S124/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"sqKey": "CommentRegularExpression"
"sqKey": "CommentRegularExpression",
"tags": [
"convention"
]
}
5 changes: 4 additions & 1 deletion rules/S1244/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"constantCost": "5min"
},
"tags": [

"suspicious",
"numpy",
"pytourch",
"data-science"
],
"extra": {
"replacementRules": [
Expand Down
2 changes: 1 addition & 1 deletion rules/S1311/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"linearFactor": "1min"
},
"tags": [

"brain-overload"
],
"extra": {
"replacementRules": [
Expand Down
4 changes: 3 additions & 1 deletion rules/S1313/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{

"tags": [
"bad-practice"
]
}
4 changes: 3 additions & 1 deletion rules/S1451/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"func": "Constant\/Issue",
"constantCost": "5min"
},
"tags": [],
"tags": [
"convention"
],
"extra": {
"replacementRules": [],
"legacyKeys": [
Expand Down
5 changes: 4 additions & 1 deletion rules/S1523/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"status": "deprecated",
"quickfix": "unknown"
"quickfix": "unknown",
"tags": [
"deprecated"
]
}
5 changes: 4 additions & 1 deletion rules/S1542/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{

"tags": [
"convention",
"pep"
]
}
5 changes: 4 additions & 1 deletion rules/S1656/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{

"tags": [
"convention",
"confusing"
]
}
2 changes: 1 addition & 1 deletion rules/S1716/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"constantCost": "10min"
},
"tags": [

"pitfall"
],
"extra": {
"replacementRules": [
Expand Down
2 changes: 1 addition & 1 deletion rules/S1717/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"constantCost": "2min"
},
"tags": [

"deprecated"
],
"extra": {
"replacementRules": [
Expand Down
2 changes: 1 addition & 1 deletion rules/S1720/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"constantCost": "5min"
},
"tags": [

"convention"
],
"extra": {
"replacementRules": [
Expand Down
2 changes: 1 addition & 1 deletion rules/S1721/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"constantCost": "1 min"
},
"tags": [

"deprecated"
],
"extra": {
"replacementRules": [
Expand Down
3 changes: 2 additions & 1 deletion rules/S1751/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"constantCost": "5min"
},
"tags": [

"confusing",
"bad-practice"
],
"extra": {
"replacementRules": [
Expand Down
2 changes: 1 addition & 1 deletion rules/S1764/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"constantCost": "2min"
},
"tags": [

"suspicious"
],
"extra": {
"replacementRules": [
Expand Down
6 changes: 5 additions & 1 deletion rules/S1845/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"title": "Methods and field names should not differ only by capitalization"
"title": "Methods and field names should not differ only by capitalization",
"tags": [
"confusing",
"convention"
]
}
3 changes: 2 additions & 1 deletion rules/S1908/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"sqKey": "FileComplexity"
"sqKey": "FileComplexity",
"tags": ["brain-overload"]
}
8 changes: 7 additions & 1 deletion rules/S2092/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{

"tags": [
"cwe",
"privacy",
"fastapi",
"django",
"flask"
]
}
5 changes: 4 additions & 1 deletion rules/S2159/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
},
"attribute": "LOGICAL"
},
"defaultSeverity": "Blocker"
"defaultSeverity": "Blocker",
"tags": [
"suspicious"
]
}
3 changes: 2 additions & 1 deletion rules/S2201/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"constantCost": "10min"
},
"tags": [

"suspicious",
"confusing"
],
"extra": {
"replacementRules": [
Expand Down
4 changes: 4 additions & 0 deletions rules/S2208/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"defaultQualityProfiles": [
"Sonar way"
],
"tags": [
"pitfall",
"bad-practice"
]
}
5 changes: 4 additions & 1 deletion rules/S2257/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{

"tags": [
"cwe",
"bad-practice"
]
}
5 changes: 4 additions & 1 deletion rules/S2275/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"title": "String formatting should not lead to runtime errors"
"title": "String formatting should not lead to runtime errors",
"tags": [
"pitfall"
]
}
2 changes: 1 addition & 1 deletion rules/S2319/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"constantCost": "5min"
},
"tags": [

"convention"
],
"extra": {
"replacementRules": [
Expand Down
5 changes: 4 additions & 1 deletion rules/S2711/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"func": "Constant\/Issue",
"constantCost": "15min"
},
"tags": [],
"tags": [
"pitfall",
"syntax"
],
"extra": {
"replacementRules": [],
"legacyKeys": []
Expand Down
6 changes: 5 additions & 1 deletion rules/S2712/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
"func": "Constant\/Issue",
"constantCost": "15min"
},
"tags": [],
"tags": [
"pitfall",
"python3",
"syntax"
],
"extra": {
"replacementRules": [],
"legacyKeys": []
Expand Down
2 changes: 1 addition & 1 deletion rules/S2733/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"constantCost": "5min"
},
"tags": [

"pitfall"
],
"extra": {
"replacementRules": [
Expand Down
3 changes: 2 additions & 1 deletion rules/S2734/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"constantCost": "5min"
},
"tags": [

"convention",
"pitfall"
],
"defaultSeverity": "Blocker",
"ruleSpecification": "RSPEC-2734",
Expand Down
5 changes: 4 additions & 1 deletion rules/S2757/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{

"tags": [
"confusing",
"convention"
]
}
2 changes: 1 addition & 1 deletion rules/S2761/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"constantCost": "5min"
},
"tags": [

"confusing"
],
"extra": {
"replacementRules": [
Expand Down
2 changes: 1 addition & 1 deletion rules/S2772/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"constantCost": "2min"
},
"tags": [
"unused"
"confusing"
],
"extra": {
"replacementRules": [
Expand Down
4 changes: 3 additions & 1 deletion rules/S2823/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"func": "Constant\/Issue",
"constantCost": "1min"
},
"tags": [],
"tags": [
"python3"
],
"extra": {
"replacementRules": [],
"legacyKeys": []
Expand Down
5 changes: 4 additions & 1 deletion rules/S2876/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"func": "Constant\/Issue",
"constantCost": "10min"
},
"tags": [],
"tags": [
"python3",
"pep"
],
"extra": {
"replacementRules": [],
"legacyKeys": []
Expand Down
5 changes: 4 additions & 1 deletion rules/S3329/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{

"tags": [
"cwe",
"bad-practice"
]
}
8 changes: 7 additions & 1 deletion rules/S3330/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{

"tags": [
"cwe",
"privacy",
"flask",
"fastapi",
"django"
]
}
7 changes: 6 additions & 1 deletion rules/S3403/python/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@
},
"attribute": "LOGICAL"
},
"defaultSeverity": "Blocker"
"defaultSeverity": "Blocker",
"tags": [
"confusing",
"pitfall",
"typing"
]
}
6 changes: 5 additions & 1 deletion rules/S3516/python/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"title": "Functions returns should not be invariant"
"title": "Functions returns should not be invariant",
"tags": [
"confusing",
"design"
]
}
Loading

0 comments on commit 45b01ab

Please sign in to comment.