This repository hosts the Objective-C plugin for SonarQube. This plugin enables to analyze and track the quality of iOS (iPhone, iPad) and MacOS developments.
The plugin is in active development and has been bootstrapped with the help of the Sonar team. If you wish to contribute, check the Contributing wiki page.
Find below an example of an iOS SonarQube dashboard:
- [ ] Complexity
- [ ] Design
- [x] Documentation
- [x] Duplications
- [x] Issues
- [x] Size
- [x] Tests
For more details, see the list of Sonar metrics implemented or pending.
The latest release is the 0.3.1, and it's available here.
You can also download the latest build of the plugin from Cloudbees.
In the worst case, the Maven repository is available here: http://repository-rfelden.forge.cloudbees.com/
- a Mac with Xcode...
- SonarQube and SonarQube Runner installed
xctool (HomeBrew installed and
brew install xctool)
- OCLint 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).
- gcovr installed
- Install the plugin through the Update Center (of SonarQube) or download it into the $SONARQUBE_HOME/extensions/plugins directory
- Restart the SonarQube server.
- Copy sonar-project.properties in your Xcode project root folder (along your .xcodeproj file)
- Edit the sonar-project.properties file to match your Xcode iOS/MacOS project
- Copy run-sonar.sh in your Xcode project root folder and make it executable
The good news is that you don't have to modify your Xcode project to enable Sonar!. Ok, there might be one needed modification if you don't have a specific scheme for your test target, but that's all.
- Run the script
run-sonar.shin your Xcode project root folder
- Enjoy or file an issue!
- Cyril Picat
- Denis Bregeon
- Romain Felden
- François Helg
- Mete Balci
- v0.3.1 (2013/10): fix release
- v0.3 (2013/10): added support for OCUnit tests and test coverage
- v0.2 (2013/10): added OCLint checks as Sonar violations
- v0.0.1 (2012/09): v0 with basic metrics such as nb lines of code, nb lines of comment, nb of files, duplications
Sonar Plugin for Objective C is released under the GNU LGPL 3 license: