Skip to content

Commit d5d7a48

Browse files
author
Gilles Grousset
committed
Updated scripts and documentation
1 parent 13a60a7 commit d5d7a48

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

README.md

+6-11
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,17 @@ Find below an example of an iOS SonarQube dashboard:
2222

2323
For more details, see the list of [Sonar metrics](https://github.com/octo-technology/sonar-objective-c/wiki/Features) implemented or pending.
2424

25-
###Download
25+
###Compatibility
2626

27-
The latest release is the 0.3.1, and it's available [here](http://bit.ly/1fSwd5I).
28-
29-
You can also download the latest build of the plugin from [Cloudbees](https://rfelden.ci.cloudbees.com/job/sonar-objective-c/lastSuccessfulBuild/artifact/target/).
30-
31-
In the worst case, the Maven repository is available here: http://repository-rfelden.forge.cloudbees.com/
27+
- Use 0.3.x releases for SonarQube 3.x
28+
- Use 0.4.x releases for SonarQube 4.x
3229

3330
###Prerequisites
3431

3532
- a Mac with Xcode...
36-
- [SonarQube](http://docs.codehaus.org/display/SONAR/Setup+and+Upgrade) and [SonarQube Runner](http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+SonarQube+Runner) installed
33+
- [SonarQube](http://docs.codehaus.org/display/SONAR/Setup+and+Upgrade) and [SonarQube Runner](http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+SonarQube+Runner) installed ([HomeBrew](http://brew.sh) installed and ```brew install sonar-runner```)
3734
- [xctool](https://github.com/facebook/xctool) ([HomeBrew](http://brew.sh) installed and ```brew install xctool```)
38-
- [OCLint](http://docs.oclint.org/en/dev/intro/installation.html) installed. In my case the 0.7 version is failing on my project, so I recommend installing the 0.8.dev version (at least it works with oclint-0.8.dev.2888e0f).
35+
- [OCLint](http://docs.oclint.org/en/dev/intro/installation.html) installed. Version 0.8.1 recommanded ([HomeBrew](http://brew.sh) installed and ```brew install https://gist.githubusercontent.com/TonyAnhTran/e1522b93853c5a456b74/raw/157549c7a77261e906fb88bc5606afd8bd727a73/oclint.rb```).
3936
- [gcovr](http://gcovr.com) installed
4037

4138
###Installation (once for all your Objective-C projects)
@@ -53,15 +50,13 @@ In the worst case, the Maven repository is available here: http://repository-rfe
5350
- Run the script ```run-sonar.sh``` in your Xcode project root folder
5451
- Enjoy or file an issue!
5552

56-
###Build Status
57-
[![Build Status](https://rfelden.ci.cloudbees.com/job/sonar-objective-c/badge/icon)](https://rfelden.ci.cloudbees.com/job/sonar-objective-c/)
58-
5953
###Credits
6054
* **Cyril Picat**
6155
* **Denis Bregeon**
6256
* **Romain Felden**
6357
* **François Helg**
6458
* **Mete Balci**
59+
* **Gilles Grousset**
6560

6661
###History
6762
- v0.3.1 (2013/10): fix release

sample/sonar-project.properties

+8
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ sonar.projectDescription=Fake description
1212

1313
# Path to source directories
1414
sonar.sources=srcDir1,srcDir2
15+
# Path to test directories (comment if no test)
16+
sonar.tests=testSrcDir
17+
1518

1619
# Xcode project configuration (.xcodeproj or .xcworkspace)
1720
# -> If you have a project: configure only sonar.objectivec.project
@@ -48,3 +51,8 @@ sonar.sourceEncoding=UTF-8
4851
# Paths to exclude from coverage report (tests, 3rd party libraries etc.)
4952
# sonar.objectivec.excludedPathsFromCoverage=pattern1,pattern2
5053
sonar.objectivec.excludedPathsFromCoverage=.*Tests.*
54+
55+
# Project SCM settings
56+
# sonar.scm.enabled=true
57+
# sonar.scm.url=scm:git:https://...
58+

src/main/shell/run-sonar.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ function runCommand() {
101101
$command "$@"
102102
fi
103103

104-
if [[ $? != 0 && $? != 5 ]] ; then
104+
returnValue=$?
105+
if [[ $returnValue != 0 && $returnValue != 5 ]] ; then
105106
stopProgress
106107
echo "ERROR - Command '$command $@' failed with error code: $returnValue"
107108
exit $?
@@ -286,7 +287,8 @@ if [ "$oclint" = "on" ]; then
286287
fi
287288

288289
# Run OCLint with the right set of compiler options
289-
runCommand no oclint-json-compilation-database $includedCommandLineFlags -- -report-type pmd -o sonar-reports/oclint.xml
290+
maxPriority=10000
291+
runCommand no oclint-json-compilation-database $includedCommandLineFlags -- -max-priority-1 $maxPriority -max-priority-2 $maxPriority -max-priority-3 $maxPriority -report-type pmd -o sonar-reports/oclint.xml
290292
else
291293
echo 'Skipping OCLint (test purposes only!)'
292294
fi

0 commit comments

Comments
 (0)