File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ sonar.sourceEncoding=UTF-8
46
46
# The XML files have to be prefixed by TEST- otherwise they are not processed
47
47
# sonar.junit.reportsPath=sonar-reports/
48
48
49
+ # Lizard report generated by run-sonar.sh is stored in sonar-reports/lizard-report.xml
50
+ # Change it only if you generate the file on your own
51
+ # sonar.swift.lizard.report=sonar-reports/lizard-report.xml
52
+
49
53
# Cobertura report generated by run-sonar.sh is stored in sonar-reports/coverage.xml
50
54
# Change it only if you generate the file on your own
51
55
# sonar.swift.coverage.reportPattern=sonar-reports/coverage*.xml
Original file line number Diff line number Diff line change @@ -124,6 +124,8 @@ function runCommand() {
124
124
vflag=" "
125
125
nflag=" "
126
126
swiftlint=" on"
127
+ lizard=" on"
128
+
127
129
while [ $# -gt 0 ]
128
130
do
129
131
case " $1 " in
165
167
srcDirs=' ' ; readParameter srcDirs ' sonar.sources'
166
168
# The name of your application scheme in Xcode
167
169
appScheme=' ' ; readParameter appScheme ' sonar.swift.appScheme'
170
+ # The name of your test scheme in Xcode
171
+ testScheme=' ' ; readParameter testScheme ' sonar.swift.testScheme'
168
172
169
173
# Read destination simulator
170
174
destinationSimulator=' ' ; readParameter destinationSimulator ' sonar.swift.simulator'
@@ -276,6 +280,18 @@ else
276
280
echo ' Skipping SwiftLint (test purposes only!)'
277
281
fi
278
282
283
+ # Lizard Complexity
284
+ if [ " $lizard " = " on" ]; then
285
+ if hash lizard 2> /dev/null; then
286
+ echo -n ' Running Lizard...'
287
+ lizard --xml " $srcDirs " > sonar-reports/lizard-report.xml
288
+ else
289
+ echo ' Skipping Lizard (not installed!)'
290
+ fi
291
+ else
292
+ echo ' Skipping Lizard (test purposes only!)'
293
+ fi
294
+
279
295
# SonarQube
280
296
echo -n ' Running SonarQube using SonarQube Runner'
281
297
runCommand /dev/stdout sonar-runner
You can’t perform that action at this time.
0 commit comments