Sonarqube is a web application platform, installable on Linux, Windows or OSX, which helps teams manage & fix code quality issues – things like ensuring coding standards are maintained, sufficient commenting, unit test coverage, functional test coverage, etc.

These were the basic steps in setting up a Mac OSX machine to run as a continuous integration agent to fire off Sonarqube (the artist formerly known as “Sonar”) analysis runs against the Xcode project, using Gradle as a build mechanism.

These instructions were used to install Sonar on a Mac Mini Server and a new Mac Pro, both running Mac OS X Mavericks 10.9.4.

CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'sonar' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'%' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'localhost' IDENTIFIED BY 'sonar';
FLUSH PRIVILEGES; 
#----- MySQL 5.x
# Comment the embedded database and uncomment the following line to use MySQL
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true

Comments

Nathan Hegedus — September 8, 2014 at 1:41 pm

Hi, I’m trying to use Sonarqube, but I’ve many problems.

I’ve tried this way https://github.com/octo-technology/sonar-objective-c, but it not work.

Always appear this message:

“Skipping tests as no test scheme has been provided! -n Running OCLint… -n .

-n Running SonarQube using SonarQube Runner run-sonar.sh: line 98: sonar-runner: command not found ERROR – Command ‘sonar-runner ‘ failed with error code: ”

I followed your tutorial, but I need to do some before right?

Can you help me?

Running Sonar on iOS (Objective-C) Projects with Gradle | Engineering a New World — September 8, 2014 at 5:57 pm

[…] getting the basics out of the way on setting up Sonarqube on Mac OSX, one has to invoke it somehow. We settled on building our iOS project with Gradle, and as such, […]