-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.json
211 lines (211 loc) · 15.1 KB
/
config.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
{
"rules_version": 20231222,
"plugins": [
"https://github.com/checkstyle/sonar-checkstyle/releases/download/10.16.0/checkstyle-sonar-plugin-10.16.0.jar",
"https://github.com/dependency-check/dependency-check-sonar-plugin/releases/download/5.0.0/sonar-dependency-check-plugin-5.0.0.jar",
"https://github.com/sbaudoin/sonar-ansible/releases/download/v2.5.1/sonar-ansible-plugin-2.5.1.jar",
"https://github.com/sbaudoin/sonar-yaml/releases/download/v1.9.1/sonar-yaml-plugin-1.9.1.jar",
"https://github.com/spotbugs/sonar-findbugs/releases/download/4.2.9/sonar-findbugs-plugin-4.2.9.jar",
"https://github.com/vaulttec/sonar-auth-oidc/releases/download/v2.1.1/sonar-auth-oidc-plugin-2.1.1.jar"
],
"profiles": {
"yaml": {
"plugin_name": "sonar-ansible-plugin",
"plugin_external": true,
"version": "ansible-profile-v2.5.1"
},
"cs": {
"plugin_name": "csharp-plugin",
"version": "cs-profile-v9.23.2"
},
"java": {
"plugin_name": "java-plugin",
"version": "java-profile-v7.33.0"
},
"js": {
"plugin_name": "javascript-plugin",
"version": "js-profile-v10.13.2"
},
"kotlin": {
"plugin_name": "kotlin-plugin",
"version": "kotlin-profile-v2.20.0"
},
"py": {
"plugin_name": "python-plugin",
"version": "py-profile-v4.17.0"
},
"swift": {
"plugin_name": "swift-plugin",
"version": "swift-profile-v4.12.0"
},
"ts": {
"plugin_name": "javascript-plugin",
"version": "js-profile-v10.13.2"
},
"vbnet": {
"plugin_name": "vbnet-plugin",
"version": "vbnet-profile-v9.23.2"
},
"web": {
"plugin_name": "html-plugin",
"version": "web-profile-v3.15.0"
}
},
"rules": {
"cs": [
"+types=SECURITY_HOTSPOT,VULNERABILITY",
"+csharpsquid:S104 # NCSS; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#long-units)",
"+csharpsquid:S1067 # Too complex expression; NOT used by Quality-time",
"+csharpsquid:S107|max=5 # Too many parameters; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#many-parameters)",
"+csharpsquid:S109 # Magic numbers; NOT used by Quality-time",
"+csharpsquid:S1151 # Switch case clauses should not have too many lines of code. Used by Quality-time",
"+csharpsquid:S125 # Commented code; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#commented-out-code)",
"+csharpsquid:S1309 # Violation suppression; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#suppressed-violations)",
"+csharpsquid:S134 # Depth of nesting; NOT used by Quality-time",
"+csharpsquid:S138|max=20 # Methods with too many lines; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#long-units)",
"+csharpsquid:S1541|maximumFunctionComplexityThreshold=10 # Used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#complex-units)"
],
"java": [
"+types=SECURITY_HOTSPOT,VULNERABILITY",
"+java:NoSonar # Used by Quality-time to report on suppressed violations (https://quality-time.readthedocs.io/en/latest/reference.html#suppressed-violations)",
"+java:S104 # Files should not have too many lines of code. Used by Quality-time",
"+java:S1067 # Expression too complex; NOT used by Quality-time",
"+java:S107|max=5 # Too many parameters; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#many-parameters)",
"+java:S109 # Magic numbers; NOT used by Quality-time",
"+java:S1151 # Switch case clauses should not have too many lines of code. Used by Quality-time",
"+java:S1188 # Anonymous classes should not have too many lines. Used by Quality-time",
"+java:S125 # Used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#commented-out-code)",
"+java:S1309 # Used by Quality-time to report on suppressed violations (https://quality-time.readthedocs.io/en/latest/reference.html#suppressed-violations)",
"+java:S1310 # Used by Quality-time to report on suppressed violations (https://quality-time.readthedocs.io/en/latest/reference.html#suppressed-violations)",
"+java:S1315 # Used by Quality-time to report on suppressed violations (https://quality-time.readthedocs.io/en/latest/reference.html#suppressed-violations)",
"+java:S138|max=20 # Methods with too many lines; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#long-units)",
"+java:S1541|Threshold=10 # Used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#complex-units)",
"+java:S2972 # Inner classes should not have too many lines of code. Used by Quality-time",
"+java:S5612 # Lambdas should not have too many lines. Used by Quality-time"
],
"js": [
"+types=SECURITY_HOTSPOT,VULNERABILITY",
"+javascript:S104 # Files should not have too many lines of code. Used by Quality-time",
"+javascript:S106 # Console logging should not be used; NOT used by Quality-time",
"+javascript:S1067 # Expression too complex; NOT used by Quality-time",
"+javascript:S107|maximumFunctionParameters=5 # Too many parameters; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#many-parameters)",
"+javascript:S109 # Magic numbers; NOT used by Quality-time",
"+javascript:S125 # Used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#commented-out-code)",
"+javascript:S134 # NOT used by Quality-time",
"+javascript:S138|max=40 # Methods with too many lines; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#long-units)",
"+javascript:S1541|maximumFunctionComplexityThreshold=10 # Used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#complex-units)",
"# Missing: NoSonar, NCSS, Parameters"
],
"kotlin": [
"+types=SECURITY_HOTSPOT,VULNERABILITY",
"+kotlin:S104 # Files should not have too many lines of code. Used by Quality-time",
"+kotlin:S1067 # Expression too complex; NOT used by Quality-time",
"+kotlin:S107|Max=5 # Too many parameters; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#many-parameters)",
"+kotlin:S1151 # When clauses should not have too many lines of code. Used by Quality-time",
"+kotlin:S138|max=20 # Methods with too many lines; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#long-units)",
"+kotlin:S5612 # Lambdas should not have too many lines. Used by Quality-time"
],
"py": [
"+types=SECURITY_HOTSPOT,VULNERABILITY",
"+python:FunctionComplexity|maximumFunctionComplexityThreshold=10 # Used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#complex-units)",
"+python:NoSonar # Used by Quality-time to report on suppressed violations (https://quality-time.readthedocs.io/en/latest/reference.html#suppressed-violations)",
"+python:S104 # Too many lines of code in file; NOT used by Quality-time",
"+python:S107|max=5 # Too many parameters; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#many-parameters)",
"+python:S125 # Commented code; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#commented-out-code)",
"+python:S134 # Too deep nesting; NOT used by Quality-time",
"+python:S138|max=20 # Methods with too many lines; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#long-units)"
],
"swift": [
"+types=SECURITY_HOTSPOT,VULNERABILITY",
"+swift:S104 # Files should not have too many lines of code. Used by Quality-time",
"+swift:S1067 # Expression too complex; NOT used by Quality-time",
"+swift:S107|functionMax=5 # Too many parameters; used by Quality-time (https://github.com/ICTU/quality-time/blob/master/docs/METRICS_AND_SOURCES.md#many-parameters-from-sonarqube)",
"+swift:S1151 # Switch case clauses should not have too many lines of code. Used by Quality-time",
"+swift:S1188 # Closures should not have too many lines. Used by Quality-time",
"+swift:S125 # Used by Quality-time (https://github.com/ICTU/quality-time/blob/master/docs/METRICS_AND_SOURCES.md#commented-out-code-from-sonarqube)",
"+swift:S138|max=20 # Methods with too many lines; used by Quality-time (https://github.com/ICTU/quality-time/blob/master/docs/METRICS_AND_SOURCES.md#long-units-from-sonarqube)",
"+swift:S1541|Threshold=10 # Used by Quality-time (https://github.com/ICTU/quality-time/blob/master/docs/METRICS_AND_SOURCES.md#complex-units-from-sonarqube)",
"+swift:S2042 # Classes should not have too many lines of code. Used by Quality-time"
],
"ts": [
"+types=SECURITY_HOTSPOT,VULNERABILITY",
"+typescript:S104 # File length; NOT used by Quality-time",
"+typescript:S106 # Console logging; NOT used by Quality-time",
"+typescript:S1067 # Expression too complex; NOT used by Quality-time",
"+typescript:S107|maximumFunctionParameters=5 # Too many parameters; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#many-parameters)",
"+typescript:S109 # Magic number; NOT used by Quality-time",
"+typescript:S138|max=40 # Methods with too many lines; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#long-units)",
"+typescript:S1541|Threshold=10 # Used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#complex-units)",
"+typescript:S4204 # The 'any' type should not be used; NOT used by Quality-time",
"-typescript:S4328 # reason: the rule does not recognize 'local' imports"
],
"vbnet": [
"+types=SECURITY_HOTSPOT,VULNERABILITY",
"+vbnet:S104 # Files should not have too many lines of code. Used by Quality-time",
"+vbnet:S1067 # Expression too complex; NOT used by Quality-time",
"+vbnet:S107|max=5 # Too many parameters; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#many-parameters)",
"+vbnet:S1151 # Select Case clauses should not have too many lines of code. Used by Quality-time",
"+vbnet:S138|max=20 # Methods with too many lines; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#long-units)",
"+vbnet:S1541|maximumFunctionComplexityThreshold=10 # Too complex function, procedure or property; Used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#complex-units)",
"# Missing: method length, NoSonar, too many parameters, commented loc"
],
"web": [
"+types=SECURITY_HOTSPOT,VULNERABILITY",
"+Web:AvoidCommentedOutCodeCheck # Used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#commented-out-code)",
"+Web:ComplexityCheck # NOT used by Quality-time. Rule is deprecated, see https://rules.sonarsource.com/html/RSPEC-1908?search=complexity",
"+Web:FileLengthCheck # Files should not have too many lines. Used by Quality-time",
"+Web:LongJavaScriptCheck # Used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#long-units)"
],
"yaml": [
"+types=SECURITY_HOTSPOT,VULNERABILITY",
"+ansible:ANSIBLE0002",
"+ansible:ANSIBLE0004",
"+ansible:ANSIBLE0005",
"+ansible:ANSIBLE0008",
"+ansible:ANSIBLE0009",
"+ansible:ANSIBLE0010",
"+ansible:ANSIBLE0011",
"+ansible:E101",
"+ansible:E102",
"+ansible:E103",
"+ansible:E104",
"+ansible:E105",
"+ansible:E203",
"+ansible:E205",
"+ansible:E206",
"+ansible:E301",
"+ansible:E302",
"+ansible:E303",
"+ansible:E304",
"+ansible:E305",
"+ansible:E401",
"+ansible:E403",
"+ansible:E404",
"+ansible:E405",
"+ansible:E501",
"+ansible:E503",
"+ansible:E504",
"+ansible:E601",
"+ansible:E602",
"+yaml:BracesCheck|max-spaces-inside=1;max-spaces-inside-empty=-1;min-spaces-inside-empty=-1;min-spaces-inside=1",
"+yaml:BracketsCheck|max-spaces-inside=0;max-spaces-inside-empty=-1;min-spaces-inside-empty=-1;min-spaces-inside=0",
"+yaml:ColonsCheck|max-spaces-before=0;max-spaces-after=1",
"+yaml:CommasCheck|max-spaces-before=0;max-spaces-after=1;min-spaces-after=1",
"+yaml:CommentsCheck|require-starting-space=true;min-spaces-from-content=2",
"+yaml:CommentsIndentationCheck",
"+yaml:DocumentStartCheck|present=true",
"+yaml:EmptyLinesCheck|max=2;max-start=0;max-end=0",
"+yaml:EmptyValuesCheck|forbid-in-flow-mappings=false;forbid-in-block-mappings=false",
"+yaml:HyphensCheck|max-spaces-after=1",
"+yaml:IndentationCheck|check-multi-line-strings=false;spaces=consistent;indent-sequences=true",
"+yaml:KeyDuplicatesCheck",
"+yaml:LineLengthCheck|allow-non-breakable-words=true;max=130;allow-non-breakable-inline-mappings=true",
"+yaml:NewLineAtEndOfFileCheck",
"+yaml:NewLinesCheck|type=unix",
"+yaml:OctalValuesCheck|forbid-implicit-octal=false;forbid-explicit-octal=false",
"+yaml:ParsingErrorCheck",
"+yaml:TrailingSpacesCheck",
"-yaml:TruthyCheck"
]
}
}