Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lizard integration #90

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
properties for lizard and lizard report is now generated by run-sonar.sh
Andres Gil Herrera committed May 28, 2015
commit e9148834749a8de76ea003615ac25a423959ec5a
4 changes: 4 additions & 0 deletions sample/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -48,6 +48,10 @@ sonar.sourceEncoding=UTF-8
# Change it only if you generate the file on your own
# sonar.objectivec.oclint.report=sonar-reports/oclint.xml

# Lizard report generated by run-sonar.sh is stored in sonar-reports/lizard-report.xml
# Change it only if you generate the file on your own
# sonar.objectivec.lizard.report=sonar-reports/lizard-report.xml

# Paths to exclude from coverage report (tests, 3rd party libraries etc.)
# sonar.objectivec.excludedPathsFromCoverage=pattern1,pattern2
sonar.objectivec.excludedPathsFromCoverage=.*Tests.*
12 changes: 12 additions & 0 deletions src/main/shell/run-sonar.sh
Original file line number Diff line number Diff line change
@@ -117,6 +117,7 @@ function runCommand() {
vflag=""
nflag=""
oclint="on"
lizard="on"
while [ $# -gt 0 ]
do
case "$1" in
@@ -293,6 +294,17 @@ else
echo 'Skipping OCLint (test purposes only!)'
fi

if [ "$lizard" = "on" ]; then

# Lizard
echo -n 'Running Lizard...'

# Run Lizard with xml output option and write the output in sonar-reports/lizard-report.xml
runCommand lizard --xml "$srcDirs" > sonar-reports/lizard-report.xml
else
echo 'Skipping Lizard (test purposes only!)'
fi

# SonarQube
echo -n 'Running SonarQube using SonarQube Runner'
runCommand /dev/stdout sonar-runner