octo-technology / sonar-objective-c

Sonar Plugin for Objective C
517 stars 208 forks source link

Analysis: 0% everywhere #80

Open Kowaio opened 9 years ago

Kowaio commented 9 years ago

Hi guys,

Sorry to bother you with this issue but I didn't find anything in here or by googling it.

I've installed SonarQube, sonar-runner and this plugin (0.4) and tried to analyse the project I'm working on.

Here's the result : http://cl.ly/image/1I281B1M3C1A

As you can see, the files and directories are correctly found but there are no issues encountered, as well as duplications and so on. And yeah, it's weird.

Regarding the installation I have:

In my sonar-project.properties I have: sonar.projectKey=Project sonar.projectName=Project sonar.projectVersion=1.0 sonar.language=objc sonar.sources=/Users/username/Desktop/project_root/project_name/Classes sonar.objectivec.project=project_name.xcodeproj sonar.objectivec.workspace=project_name.xcworkspace sonar.objectivec.appScheme=project_name sonar.sourceEncoding=UTF-8

And when running ./run-sonar.sh in my project_root/ directory, I've got this output: $ ./run-sonar.sh Running run-sonar.sh... Extracting Xcode project information.. ......... Skipping tests as no test scheme has been provided! Running OCLint... Running SonarQube using SonarQube Runner... $

Thanks a lot guys, let me know if you need more info.

Best,

wooster commented 9 years ago

You need a testScheme setting in the sonar-project.properties file, like so:

sonar.objectivec.testScheme=UnitTests
rompic commented 9 years ago

see https://github.com/octo-technology/sonar-objective-c/issues/71 check your quality profile!