Skip to content
This repository

Sonar Plugin for Objective C

branch: master
README.md

Sonar Plugin for Objective C

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:

Example iOS SonarQube dashboard

Features

  • [ ] Complexity
  • [ ] Design
  • [x] Documentation
  • [x] Duplications
  • [x] Issues
  • [x] Size
  • [x] Tests

For more details, see the list of Sonar metrics implemented or pending.

Download

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/

Prerequisites

  • 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

Installation (once for all your Objective-C projects)

  • Install the plugin through the Update Center (of SonarQube) or download it into the $SONARQUBE_HOME/extensions/plugins directory
  • Restart the SonarQube server.

Configuration (once per project)

  • 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.

Analysis

  • Run the script run-sonar.sh in your Xcode project root folder
  • Enjoy or file an issue!

Build Status

Build Status

Credits

  • Cyril Picat
  • Denis Bregeon
  • Romain Felden
  • François Helg
  • Mete Balci

History

  • 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

License

Sonar Plugin for Objective C is released under the GNU LGPL 3 license:
http://www.gnu.org/licenses/lgpl.txt

Something went wrong with that request. Please try again.