Git Product home page Git Product logo

sonar-objective-c's Introduction

Important : this plugin is not maintained anymore. Please switch to our (Swift plugin)[https://github.com/Backelite/sonar-swift] which now supports Swift and Objective-C

Branch Status
master Build Status
develop Build Status

SonarQube Plugin for Objective-C

This repository is a fork of the open source SonarQube Plugin for Objective-C. It provides modifications and extra features needed for our internal use.

A SonarQube 5.0 dashboard of the iOS open source project GreatReader:

Example iOS SonarQube dashboard

Features

Feature Supported Details
Complexity YES Uses Lizard
Design NO
Documentation YES
Duplications YES
Issues YES Uses OCLint: 71 rules, and Faux Pas: 102 rules
Size YES
Tests YES Uses xctool, will probably switch to xcodebuild + xcpretty soon
Code coverage YES With gcovr for project before Xcode 7, otherwise slather

Compatibility

Releases available from this repository are compliant with SonarQube 4.3.x and above.

In order not to break compatibility with the original plugin, plugin releases are numbered with 4 digits.

Faux Pas support

Faux Pas is a wonderful tool to analyse iOS or Mac applications source code, however it is not free. A 30 trial version is available here.

The plugin runs fine even if Faux Pas is not installed (Faux Pas analysis will be skipped).

Download

Binary packages are available in the release section.

Release history

0.6.3

  • SonarQube 7.0 support

0.6.2

  • SonarQube 6.7 support
  • FauxPas 1.7.2 support (4 new rules added)
  • OCLint 0.13 support (1 new rule added)
  • Update run-sonar.sh : xcodebuild optimization (see #26 thanks to davidy4ng).
  • Fix for properties with space (see #29 thanks to Branlute)

0.6.1

  • Replaced oclint-xcodebuild by xcpretty (see #25 thanks to davidy4ng).
  • Added -nounittests and -usesonarscanner parameters to run-sonar.sh script (see #23 thanks to davidy4ng).
  • Sonar 6 fix for Faux Pas (see #20 thanks to macostea).

0.6.0

  • SonarQube 6 support. Important : will work with SonarQube 5.x and above only. Will not work anymore with SonarQube 4.5.x anymore.

0.5.2

0.5.1

  • Complexity with Lizard !

0.5.0 (detached from octo project)

  • Detached from octo project (to hard to maintain compatibility)
  • Removed deprecated API usages for Sonarube 5.3 support

0.4.0.3 (based on 0.4.0)

  • Xcode 7 coverage support (profdata)

0.4.0.2 (based on 0.4.0)

  • Faux Pas support for release 1.5 and 1.6
  • Support for multiple projects in a same workspace

0.4.0.1 (based on 0.4.0)

  • Faux Pas support
  • Moved OCLint long line threshold to 250
  • Add the plain reporter at build step to get more information in case of build failure
  • Capitalized OCLint rule names

Prerequisites

  • a Mac with Xcode
  • SonarQube and SonarQube Runner installed (HomeBrew installed and brew install sonar-runner)
  • xcpretty (see instructions below)
  • xctool (HomeBrew installed and brew install xctool). If you are using Xcode 6, make sure to update xctool (brew upgrade xctool) to a version > 0.2.2.
  • OCLint installed. Version 0.11.0 recommended (0.13.0 since Xcode 9).
  • gcovr installed for legacy (pre Xcode 7 coverage)
  • slather (gem install slather). Version 2.1.0 or above (2.4.4 since Xcode 9).
  • lizard (PIP installed and sudo pip install lizard)
  • Faux Pas command line tools installed (optional)

Installation of xcpretty with JUnit reports fix

At the time, xcpretty needs to be fixed to work with SonarQube.

To install the fixed version, follow those steps :

git clone https://github.com/Backelite/xcpretty.git
cd xcpretty
git checkout fix/duration_of_failed_tests_workaround
gem build xcpretty.gemspec
sudo gem install --both xcpretty-0.2.2.gem

Code coverage data format

Since Xcode 7, Apple changed its coverage data format to a new format called 'profdata'. By default this format will be used by the plugin, except if you explicitly force it to legacy mode (for Xcode 6 and below) in your sonar-project.properties with this line:

sonar.objectivec.coverageType=legacy

Installation (once for all your Objective-C projects)

  • Download the plugin binary into the $SONARQUBE_HOME/extensions/plugins directory
  • Copy run-sonar.sh somewhere in your PATH
  • 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

The good news is that you don't have to modify your Xcode project to enable SonarQube!. 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!

Update (once per plugin update)

  • Install the lastest plugin version
  • Copy run-sonar.sh somewhere in your PATH

If you still have run-sonar.sh file in each of your project (not recommended), you will need to update all those files.

Contributing

Feel free to contribute to this plugin by issuing pull requests to this repository or to the original one.

License

SonarQube Plugin for Objective-C is released under the GNU LGPL 3 license.

sonar-objective-c's People

Contributors

branlute avatar cyrilpicat avatar davidy4ng avatar fabb avatar fhelg avatar ghenadie-munteanu avatar jcovoluntis avatar leverdeterre avatar meltenc avatar metebalci avatar mihaiparv avatar mikaristimaki avatar xfreebird avatar yan95g avatar zippy1978 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sonar-objective-c's Issues

Can I use this with sonar scanner plugin and Bamboo?

I'm trying to integrate sonar objective c with sonar scanner but after run only duplications appear. But when I run run-sonar.sh code smell and duplication appears. So, is it possible to use this plugin with sonar scanner for bamboo? If yes, how?

Jenkins Build Failure after installing Backlite Objective C plugin in Sonarqube

Hello,

I’m using Sonarqube version 6.2 and installed freeware backlite objective C plugin in sonarqube.

After installing this plugin in sonarqube when we were trying to build projects (maven) using jenkins, builds failed with the below error:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.1.1168:sonar (default-cli) on project cwow-parent-maven: Unable to register extension org.sonar.plugins.objectivec.ObjectiveCSquidSensor from plugin 'backelitesonarobjectivecplugin': Lorg/sonar/api/checks/AnnotationCheckFactory;: org.sonar.api.checks.AnnotationCheckFactory -> [Help 1]

Kindly help on how do resolve this issue as we need objective C plugin to be installed for a requirement.

Measure with line 0 for file '.......*.h' must be > 0

Sonar:
Sonar 6.3.0.19869
Objective C (Backelite) 0.6.1

Build Slave:
Xcode 8.3.2

Slather 2.4.2

I have seen in the sonar-Swift this issue that is exactly the same:
sonar-swift-issue-77

Where their solution is update the Slather version. I have already the lastest one 2.4.2

ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Measure with line 0 for file '............................h' must be > 0
	at org.sonar.scanner.sensor.DefaultSensorStorage.validatePositiveLine(DefaultSensorStorage.java:347)
	at org.sonar.scanner.sensor.DefaultSensorStorage.validateCoverageMeasure(DefaultSensorStorage.java:330)
	at org.sonar.scanner.sensor.DefaultSensorStorage.saveCoverageMetricInternal(DefaultSensorStorage.java:271)
	at org.sonar.scanner.sensor.DefaultSensorStorage.saveMeasure(DefaultSensorStorage.java:260)
	at org.sonar.scanner.index.DefaultIndex.addMeasure(DefaultIndex.java:155)
	at org.sonar.scanner.deprecated.DeprecatedSensorContext.saveMeasure(DeprecatedSensorContext.java:126)
	at org.sonar.plugins.objectivec.coverage.CoberturaReportParser.collectPackageMeasures(CoberturaReportParser.java:100)
	at org.sonar.plugins.objectivec.coverage.CoberturaReportParser.access$000(CoberturaReportParser.java:46)
	at org.sonar.plugins.objectivec.coverage.CoberturaReportParser$1.stream(CoberturaReportParser.java:74)
	at org.sonar.api.utils.StaxParser.parse(StaxParser.java:115)
	at org.sonar.api.utils.StaxParser.parse(StaxParser.java:95)
	at org.sonar.api.utils.StaxParser.parse(StaxParser.java:85)
	at org.sonar.plugins.objectivec.coverage.CoberturaReportParser.parse(CoberturaReportParser.java:77)
	at org.sonar.plugins.objectivec.coverage.CoberturaReportParser.parseReport(CoberturaReportParser.java:64)
	at org.sonar.plugins.objectivec.coverage.CoberturaSensor.analyse(CoberturaSensor.java:76)
	at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
	at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
	at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:74)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:175)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:262)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:257)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:247)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
	at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
	at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:118)
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:117)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
	at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
	at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
ERROR: 
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
ERROR - Command 'sonar-scanner ' failed with error code: 1

Do you have any clue?
Thanks

Unable to analyze code

I used build-and-deploy.sh to create a new objc plug-in, but after the replacement, I couldn't analyze the code on SonarQube-6.7.1, and the data I saw in the console was all 0.

NPE in DeprecatedSensorContext.saveMeasure(DeprecatedSensorContext.java:127) called from org.sonar.plugins.objectivec.tests.SurefireParser.saveClassMeasure(SurefireParser.java:167)

Hello all, any body get such error while parsing unit test report by sonar-scanner/sonar-runner (the same result for both)?

...
12:19:15.967 DEBUG: Sensors : ObjectiveCSquidSensor -> Objective-C SurefireSensor -> org.sonar.plugins.objectivec.coverage.CoberturaSensor@216e9ca3 -> org.sonar.plugins.objectivec.violations.oclint.OCLintSensor@75120e58 -> org.sonar.plugins.objectivec.violations.fauxpas.FauxPasSensor@48976e6d -> org.sonar.plugins.objectivec.complexity.LizardSensor@2a367e93 -> Coverage Report Import -> Coverage Report Import -> Unit Test Results Import -> XmlFileSensor
12:19:15.967 INFO: Sensor ObjectiveCSquidSensor
12:19:16.226 DEBUG: Metric lines is an internal metric computed by SonarQube. Provided value is ignored.
12:19:16.228 DEBUG: Metric lines is an internal metric computed by SonarQube. Provided value is ignored.
12:19:16.229 INFO: Sensor ObjectiveCSquidSensor (done) | time=262ms
12:19:16.229 INFO: Sensor Objective-C SurefireSensor
12:19:16.229 INFO: parsing sonar-reports
12:19:16.483 ERROR: Can not parse surefire reports
java.lang.NullPointerException: null
	at org.sonar.scanner.deprecated.DeprecatedSensorContext.saveMeasure(DeprecatedSensorContext.java:127) ~[sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.plugins.objectivec.tests.SurefireParser.saveClassMeasure(SurefireParser.java:167) [backelite-sonar-objective-c-plugin-0.6.0.jar:na]
	at org.sonar.plugins.objectivec.tests.SurefireParser.parseFiles(SurefireParser.java:119) [backelite-sonar-objective-c-plugin-0.6.0.jar:na]
	at org.sonar.plugins.objectivec.tests.SurefireParser.collect(SurefireParser.java:78) [backelite-sonar-objective-c-plugin-0.6.0.jar:na]
	at org.sonar.plugins.objectivec.tests.SurefireSensor.collect(SurefireSensor.java:86) [backelite-sonar-objective-c-plugin-0.6.0.jar:na]
	at org.sonar.plugins.objectivec.tests.SurefireSensor.analyse(SurefireSensor.java:80) [backelite-sonar-objective-c-plugin-0.6.0.jar:na]
	at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:182) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:247) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:242) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:232) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:118) [sonar-scanner-engine-shaded-6.1.jar:na]
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62) [sonar-scanner-api-batch2111111682724345271.jar:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121]
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) [sonar-scanner-cli-2.8.jar:na]
	at com.sun.proxy.$Proxy0.execute(Unknown Source) [na:na]
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233) [sonar-scanner-cli-2.8.jar:na]
	at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151) [sonar-scanner-cli-2.8.jar:na]
	at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110) [sonar-scanner-cli-2.8.jar:na]
	at org.sonarsource.scanner.cli.Main.execute(Main.java:74) [sonar-scanner-cli-2.8.jar:na]
	at org.sonarsource.scanner.cli.Main.main(Main.java:61) [sonar-scanner-cli-2.8.jar:na]

12:19:16.518 INFO: ------------------------------------------------------------------------
12:19:16.518 INFO: EXECUTION FAILURE
12:19:16.518 INFO: ------------------------------------------------------------------------
12:19:16.519 INFO: Total time: 15.582s
12:19:16.719 INFO: Final Memory: 43M/113M
12:19:16.719 INFO: ------------------------------------------------------------------------
12:19:16.720 ERROR: Error during SonarQube Scanner execution
org.sonar.api.utils.XmlParserException: Can not parse surefire reports
	at org.sonar.plugins.objectivec.tests.SurefireParser.parseFiles(SurefireParser.java:137)
	at org.sonar.plugins.objectivec.tests.SurefireParser.collect(SurefireParser.java:78)
	at org.sonar.plugins.objectivec.tests.SurefireSensor.collect(SurefireSensor.java:86)
	at org.sonar.plugins.objectivec.tests.SurefireSensor.analyse(SurefireSensor.java:80)
	at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
	at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
	at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:182)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:247)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:242)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:232)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
	at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
	at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115)
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:118)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
	at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
	at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.NullPointerException
	at org.sonar.scanner.deprecated.DeprecatedSensorContext.saveMeasure(DeprecatedSensorContext.java:127)
	at org.sonar.plugins.objectivec.tests.SurefireParser.saveClassMeasure(SurefireParser.java:167)
	at org.sonar.plugins.objectivec.tests.SurefireParser.parseFiles(SurefireParser.java:119)
	... 32 more

Compatibility with Sonar 6.4

I've got the error starting Sonar 6.4 with sonar-objective-c plugin:
.....
Caused by: java.lang.ClassNotFoundException: org.sonar.api.web.CodeColorizerFormat
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
... 25 common frames omitted

Looks like the same error as in Idean/sonar-swift#90

error while parsing XML stream

ERROR: Error while parsing XML stream.
com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '/' (code 47); expected a semi-colon after the reference for entity 'Cache'
at [row,col {unknown-source}]: [7334,122]

xml file:

please help?

Failed to execute sonar-maven-plugin:3.2:sonar Unable to register extension org.sonar.plugins.objectivec.ObjectiveCSquidSensor from plugin 'backelitesonarobjectivecplugin':

Hi,

I'm experiencing an issue after installing the laste version of the plugin.
My sonar build fails on all my other projects.

Here are my logs and the versions of the plugins and sonar in use.

11:38:34.893 [INFO] --- sonar-maven-plugin:3.2:sonar (default-cli) @ import-price ---
11:38:35.812 [INFO] User cache: /root/.sonar/cache
11:38:38.713 [INFO] Load global repositories
11:38:39.087 [INFO] Load global repositories (done) | time=376ms
11:38:39.116 [INFO] User cache: /root/.sonar/cache
11:38:39.595 [INFO] Load plugins index
11:38:39.600 [INFO] Load plugins index (done) | time=5ms
11:38:39.604 [INFO] Download sonar-css-plugin-2.2.jar
11:38:39.868 [INFO] Download sonar-android-plugin-1.1.jar
11:38:40.646 [INFO] Download sonar-json-plugin-2.1.jar
11:38:40.760 [INFO] Download backelite-sonar-swift-plugin-0.3.0.jar
11:38:40.902 [INFO] Download sonar-javascript-plugin-2.18.0.3454.jar
11:38:41.082 [INFO] Download sonar-findbugs-plugin-3.4.3.jar
11:38:41.648 [INFO] Download sonar-java-plugin-4.2.1.6971.jar
11:38:42.000 [INFO] Download sonar-web-plugin-2.5.0.476.jar
11:38:42.118 [INFO] Download sonar-ldap-plugin-2.1.0.507.jar
11:38:42.142 [INFO] Download sonar-scm-git-plugin-1.2.jar
11:38:42.328 [INFO] Download sonar-xml-plugin-1.4.1.jar
11:38:42.618 [INFO] Download backelite-sonar-objective-c-plugin-0.5.2.jar
11:38:42.824 [INFO] Download sonar-php-plugin-2.9.0.1664.jar
11:38:43.076 [INFO] Download sonar-l10n-fr-plugin-1.13.jar
11:38:43.084 [INFO] Plugin [l10nfr] defines 'l10nen' as base plugin. This metadata can be removed from manifest of l10n plugins since version 5.2.
11:38:43.085 [INFO] Download sonar-generic-coverage-plugin-1.2.jar
11:38:43.796 [INFO] SonarQube version: 6.0
11:38:47.446 [INFO] Default locale: "en_US", source code encoding: "UTF-8"
11:38:47.815 [INFO] Process project properties
11:38:47.912 [INFO] Load project repositories
11:38:48.088 [INFO] Load project repositories (done) | time=175ms
11:38:48.172 [INFO] Load quality profiles
11:38:48.326 [INFO] Load quality profiles (done) | time=154ms
11:38:48.336 [INFO] Load active rules
11:38:49.942 [INFO] Load active rules (done) | time=1605ms
11:38:49.996 [INFO] Publish mode
11:38:49.998 [INFO] ------------- Scan import-price xxxxx-import-price_develop
11:38:50.164 [INFO] ------------------------------------------------------------------------
11:38:50.165 [INFO] BUILD FAILURE
11:38:50.165 [INFO] ------------------------------------------------------------------------
11:38:50.165 [INFO] Total time: 17.632 s
11:38:50.165 [INFO] Finished at: 2017-01-11T11:38:50+01:00
11:38:50.534 [INFO] Final Memory: 72M/507M
11:38:50.534 [INFO] ------------------------------------------------------------------------
11:38:50.536 [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar (default-cli) on project import-price: Unable to register extension org.sonar.plugins.objectivec.ObjectiveCSquidSensor from plugin 'backelitesonarobjectivecplugin': Lorg/sonar/api/checks/AnnotationCheckFactory;: org.sonar.api.checks.AnnotationCheckFactory -> [Help 1]

Sonar do not present OCLint violation.

So I'm using this plugin in SonarQube 6.1, also with OCLint , Lizard and Fastlane. Fastlane runs OCLint, that create valid oclint.xml report, where there is a lot of stuff, but Sonar do not present any of them.

From logs I see that it found report file, so the problem lies on Sonar side. Lizard report is shown on Sonar. OClint rules profile is set to default.
Does anyone here has found that issue?

Log:

[10:41:16]: ▸ 10:41:16.067 INFO: Sensor ObjectiveCSquidSensor (done) | time=576ms
[10:41:16]: ▸ 10:41:16.067 INFO: Sensor Objective-C SurefireSensor
[10:41:16]: ▸ 10:41:16.067 INFO: parsing sonar-reports
[10:41:16]: ▸ 10:41:16.069 INFO: Sensor Objective-C SurefireSensor (done) | time=2ms
[10:41:16]: ▸ 10:41:16.069 INFO: Sensor org.sonar.plugins.objectivec.coverage.CoberturaSensor
[10:41:16]: ▸ 10:41:16.078 INFO: Sensor org.sonar.plugins.objectivec.coverage.CoberturaSensor (done) | time=9ms
[10:41:16]: ▸ 10:41:16.078 INFO: Sensor org.sonar.plugins.objectivec.violations.oclint.OCLintSensor
[10:41:16]: ▸ 10:41:16.079 INFO: Processing OCLint report oclint.xml
[10:41:16]: ▸ 10:41:16.184 INFO: Sensor org.sonar.plugins.objectivec.violations.oclint.OCLintSensor (done) | time=106ms
[10:41:16]: ▸ 10:41:16.184 INFO: Sensor org.sonar.plugins.objectivec.violations.fauxpas.FauxPasSensor
[10:41:16]: ▸ 10:41:16.185 INFO: Sensor org.sonar.plugins.objectivec.violations.fauxpas.FauxPasSensor (done) | time=1ms
[10:41:16]: ▸ 10:41:16.185 INFO: Sensor org.sonar.plugins.objectivec.complexity.LizardSensor
[10:41:16]: ▸ 10:41:16.185 INFO: Processing complexity report

Thanks for any suggestions.

Move some common settings to dedicate server page

To have a lighter setup of sonar.properties I suggest to move some common settings (sonar.objectivec.*) to a dedicated server page like Python, Java or Javascript plugins does.

For example in Java configuration page there are some tab to setup default path for Jacoco, Junit or Cobertura report.

No license for objc

sudo bash 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.ERROR: Error during SonarQube Scanner execution
ERROR: No license for objc
ERROR: 
ERROR: To see the full stack trace of the errors, re-run SonarQube Scanner with the -e switch.
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
ERROR - Command 'sonar-runner ' failed with error code: 1

My sonar-properties file looks like the attached.
sonar-project.txt

Error: unexpected EOF while looking for matching `''

Hello, i configured sonar-objective-c plugin and project (installed by manual). But when i run run-sonar.sh i get following error:

Running Lizard.../Users/admin/bin/run-sonar.sh: line 433: unexpected EOF while looking for matching `''
/Users/admin/bin/run-sonar.sh: line 440: syntax error: unexpected end of file

Could you please give me advice?
Also i changed in script "sonar-runner" with "sonar-scanner" commands (sonar-runner is deprecated)

xctool with xcode8

I am getting following error when I try to run project with xcode8,

Extracting Xcode project information.ERROR: Unexpected action: clean
ERROR - Command 'xctool -workspace LifeList.xcworkspace -sdk iphonesimulator ARCHS=i386 VALID_ARCHS=i386 CURRENT_ARCH=i386 ONLY_ACTIVE_ARCH=NO -scheme LifeList clean' failed with error code: 4

As xctool is not supported anymore with xcode8, Any thoughts how we can replace xctool with any other build tool?

SonarQube Gives Error

WARN: Metric 'lines' is an internal metric computed by SonarQube. Provided value is ignored.
ERROR: Error during SonarQube Scanner execution
ERROR: The rule 'OCLint:compiler warning' does not exist

SonarQube 6 - Faux Pas Error

Hello,

After upgrading to SonarQube 6 and updating the plugin to the 0.6 version as well, Faux Pas reports are not parsed anymore.

I get the following exception:

ERROR: Error during SonarQube Scanner execution
java.lang.NullPointerException
	at org.sonar.scanner.issue.DeprecatedIssueBuilderWrapper.line(DeprecatedIssueBuilderWrapper.java:57)
	at org.sonar.plugins.objectivec.violations.fauxpas.FauxPasReportParser.recordIssue(FauxPasReportParser.java:110)
	at org.sonar.plugins.objectivec.violations.fauxpas.FauxPasReportParser.parseReport(FauxPasReportParser.java:72)
	at org.sonar.plugins.objectivec.violations.fauxpas.FauxPasSensor.parseReportIn(FauxPasSensor.java:83)
	at org.sonar.plugins.objectivec.violations.fauxpas.FauxPasSensor.analyse(FauxPasSensor.java:68)
	at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
	at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
	at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:182)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:247)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:242)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:232)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
	at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
	at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115)
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:116)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:244)
	at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:154)
	at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:72)
	at org.sonarsource.scanner.cli.Main.main(Main.java:60)

Fauxpas upload to sonar server is error

i use 1.7.1 fauxpas cli

./run-sonar.sh

-n Running SonarQube using SonarQube Runner
-n .
-n .
-n .
ERROR: Error during SonarQube Scanner execution
ERROR: null
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarQube Scanner with the -e switch.
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
ERROR - Command 'sonar-runner ' failed with error code: 1

After this, I try sonnar-runner -X

NFO: Processing FauxPas report sonar-reports/fauxpas.json
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 19.404s
INFO: Final Memory: 57M/693M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
java.lang.NullPointerException
  at org.sonar.scanner.index.BatchComponentCache.get(BatchComponentCache.java:50)
  at org.sonar.scanner.deprecated.perspectives.BatchPerspectives.as(BatchPerspectives.java:63)
  at org.sonar.plugins.objectivec.violations.fauxpas.FauxPasReportParser.recordIssue(FauxPasReportParser.java:90)
  at org.sonar.plugins.objectivec.violations.fauxpas.FauxPasReportParser.parseReport(FauxPasReportParser.java:72)
  at org.sonar.plugins.objectivec.violations.fauxpas.FauxPasSensor.parseReportIn(FauxPasSensor.java:83)
  at org.sonar.plugins.objectivec.violations.fauxpas.FauxPasSensor.analyse(FauxPasSensor.java:68)
  at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
  at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
  at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
  at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:184)
  at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
  at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
  at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241)
  at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236)
  at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226)
  at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
  at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
  at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
  at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
  at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
  at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
  at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115)
  at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:118)
  at org.sonar.runner.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:67)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.sonar.runner.impl.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:61)
  at com.sun.proxy.$Proxy0.execute(Unknown Source)
  at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:274)
  at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:165)
  at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:152)
  at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:118)
  at org.sonarsource.scanner.cli.Main.execute(Main.java:80)
  at org.sonarsource.scanner.cli.Main.main(Main.java:66)

It is a bug? How coulde i fix this?

Support for FB Infer PMD report

The following command generates report.xml inside infer-out directory.
infer --pmd-xml -- xcodebuild -target HelloWorldApp -configuration Debug -sdk iphonesimulator

Will it be useful to include that report?

failed with error code: 6

When I executed the run-sonar. Sh script, there were errors:

ERROR - Command 'oclint-json-compilation-database -v --include ../Example/. -- -rc LONG_LINE=250 -max-priority-1 10000 -max-priority-2 10000 -max-priority-3 10000 -report-type pmd -o sonar-reports/.-oclint.xml' failed with error code: 6

Xcodebuild.log ** BUILD SUCCEEDED ** in the project root directory

Lizard scanner - Complexity / File measure exception for each file

When the scanner is reading the lizard report, for each source file, most measures save fine, but the Complexity / File measure always throws the exception below. This occurs for each source file I have but does not cause the sonar runner job to fail. Is this a version incompatability or deprecation issue? I am using SonarQube 6.2 and the 0.6.0 version of the sonar-objective-c plugin

15:44:34.296 DEBUG - Save measure Complexity in Functions for file /Users/mobile/iPadClientApp/Classes/SignatureViewController.m
15:44:34.296 DEBUG - Save measure Function Distribution / Complexity for file /Users/mobile/iPadClientApp/Classes/SignatureViewController.m
15:44:34.296 DEBUG - Save measure Complexity for file /Users/mobile/iPadClientApp/Classes/ItemDetailController.m
15:44:34.296 DEBUG - Save measure Functions for file /Users/mobile/iPadClientApp/Classes/ItemDetailController.m
15:44:34.296 DEBUG - Save measure Complexity / File for file /Users/mobile/iPadClientApp/Classes/ItemDetailController.m
15:44:34.296 ERROR -  Exception -> iPadClientApp/Classes/ItemDetailController.m -> Complexity / File
java.lang.UnsupportedOperationException: Metric 'file_complexity' should not be computed by a Sensor
	at org.sonar.scanner.sensor.DefaultSensorStorage.saveMeasure(DefaultSensorStorage.java:240)
	at org.sonar.scanner.index.DefaultIndex.addMeasure(DefaultIndex.java:231)
	at org.sonar.scanner.deprecated.DeprecatedSensorContext.saveMeasure(DeprecatedSensorContext.java:131)
	at org.sonar.plugins.objectivec.complexity.LizardMeasurePersistor.saveMeasures(LizardMeasurePersistor.java:80)
	at org.sonar.plugins.objectivec.complexity.LizardSensor.analyse(LizardSensor.java:80)
	at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
	at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
	at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:182)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:247)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:242)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:232)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
	at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
	at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115)
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:116)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:76)
	at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
	at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
	at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
	at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
	at org.sonar.runner.api.Runner.execute(Runner.java:100)
	at org.sonar.runner.Main.executeTask(Main.java:70)
	at org.sonar.runner.Main.execute(Main.java:59)
	at org.sonar.runner.Main.main(Main.java:53)

Error during SonarQube Scanner execution. The rule 'OCLint:compiler error' does not exist.

Hello, I am facing two errors when uploading the results on my sonar server where I have objective c plugin installed.

1- The rule 'OCLint:compiler error' does not exist.
2- The rule 'OCLint:compiler warning' does not exist.

OCLint version: 0.13.
sonar-objective-c version: 0.6.3

I checked in the plugin they were not listed in 'profile-oclint.xml' and 'rules.txt'. I added them manually so now it works .
I saw there are similars issues related to this problem and they are still open. I also saw there is commit which solves the problem for OCLint:compiler warning but it is not merged.

Do you know when these rules are going to be merged ?

Thanks

ERROR: The rule 'OCLint:compiler warning' does not exist.

INFO: Sensor org.sonar.plugins.objectivec.violations.oclint.OCLintSensor
INFO: Processing OCLint report sonar-reports/oclint_report.xml
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 8.993s
INFO: Final Memory: 49M/321M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: The rule 'OCLint:compiler warning' does not exist.

Any ideas what might be causing this? SonarQube 5.6

UPDATE: with some testing, OCLint 0.13 has this error, while OCLint 0.12 does not. Is there a new compiler warning that was introduced in 0.13 that does not yet exist in this sonar plugin?

Conflict with Sonarsource C/C++/Objective C plugin

Sonarsource has a commercial C/C++/Objective C plugin, if you install the SornarSource plugin it takes precedence even if you only have the license for the C/C++ functionalities (not for Objective C).

It looks like the problem is because both plugins (Backelite & SonarSource) share the same key "objc" and conflicts.

In the original project from Octo technologies they changed the value to "objectivec"

Equivalent issue in octo repo: octo-technology#88

SonarQube not displaying Unit Test results

SonarQube 6.0 with plugin version 0.6.1

Set 'sonar.tests' and 'sonar.junit.reportsPath' in sonar-project.properties

During execution of command 'sonar-scanner -X', the console output:
13:45:05.774 INFO: parsing build/sonar-reports/TEST-report.xml

But the unit tests results do not display in SonarQube

Add sonar 7.0 compatibility

Problem

When I trying to run this plugin with Sonar 7.0 I getting

Exception in thread "main" java.lang.NoClassDefFoundError: org/sonar/api/measures/PersistenceMode
	at org.sonar.plugins.objectivec.complexity.LizardReportParser.buildMeasureList(LizardReportParser.java:159)
	at org.sonar.plugins.objectivec.complexity.LizardReportParser.addComplexityFileMeasures(LizardReportParser.java:140)
	at org.sonar.plugins.objectivec.complexity.LizardReportParser.parseFile(LizardReportParser.java:109)
	at org.sonar.plugins.objectivec.complexity.LizardReportParser.parseReport(LizardReportParser.java:77)
	at org.sonar.plugins.objectivec.complexity.LizardSensor.parseReportsIn(LizardSensor.java:88)
	at org.sonar.plugins.objectivec.complexity.LizardSensor.analyse(LizardSensor.java:73)
	at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88)
	at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82)
	at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68)
	at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:88)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:180)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:288)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:283)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:261)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
	at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
	at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
	at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:111)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
	at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
	at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.ClassNotFoundException: org.sonar.api.measures.PersistenceMode
	at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
	... 37 more

According to Idean/sonar-swift#118 this class has been removed in 7.0

Questions

  • Do you have plans to support Sonar 7.0

Sonar 7.3 compatibility

The upgrade to SonarQube 7.3 gives the following crash :

+1: 2018.08.14 14:51:01 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalStateException: Fail to load plugin ObjectiveC (Backelite) [backelitesonarobjectivecplugin]
at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:82)
at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:586)
at org.sonar.server.platform.Platform.start(Platform.java:211)
at org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:185)
at org.sonar.server.platform.Platform.access$500(Platform.java:46)
at org.sonar.server.platform.Platform$1.lambda$doRun$0(Platform.java:119)
at org.sonar.server.platform.Platform$AutoStarterRunnable.runIfNotAborted(Platform.java:371)
at org.sonar.server.platform.Platform$1.doRun(Platform.java:119)
at org.sonar.server.platform.Platform$AutoStarterRunnable.run(Platform.java:355)
at java.lang.Thread.run(Thread.java:748)

How to make it compatible ?

Metric 'file_complexity' should not be computed by a Sensor

When running the sonar scanner through Fastlae, I'm getting this error for all my objc files:

[01:13:47]: ▸ ERROR:  Exception -> ./MyProject/Code/Domain/Interactors/Taxes/MyFile.m -> Complexity / File
[01:13:47]: ▸ java.lang.UnsupportedOperationException: Metric 'file_complexity' should not be computed by a Sensor
[01:13:47]: ▸ at org.sonar.scanner.sensor.DefaultSensorStorage.saveMeasure(DefaultSensorStorage.java:248)
[01:13:47]: ▸ at org.sonar.scanner.index.DefaultIndex.addMeasure(DefaultIndex.java:155)
[01:13:47]: ▸ at org.sonar.scanner.deprecated.DeprecatedSensorContext.saveMeasure(DeprecatedSensorContext.java:126)
[01:13:47]: ▸ at org.sonar.plugins.objectivec.complexity.LizardMeasurePersistor.saveMeasures(LizardMeasurePersistor.java:80)
[01:13:47]: ▸ at org.sonar.plugins.objectivec.complexity.LizardSensor.analyse(LizardSensor.java:80)
[01:13:47]: ▸ at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
[01:13:47]: ▸ at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
[01:13:47]: ▸ at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:74)
[01:13:47]: ▸ at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:175)
[01:13:47]: ▸ at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
[01:13:47]: ▸ at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
[01:13:47]: ▸ at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:262)
[01:13:47]: ▸ at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:257)
[01:13:47]: ▸ at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:247)
[01:13:47]: ▸ at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
[01:13:47]: ▸ at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
[01:13:47]: ▸ at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
[01:13:47]: ▸ at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
[01:13:47]: ▸ at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
[01:13:47]: ▸ at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
[01:13:47]: ▸ at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:118)
[01:13:47]: ▸ at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:117)
[01:13:47]: ▸ at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
[01:13:47]: ▸ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[01:13:47]: ▸ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[01:13:47]: ▸ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[01:13:47]: ▸ at java.lang.reflect.Method.invoke(Method.java:498)
[01:13:47]: ▸ at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
[01:13:47]: ▸ at com.sun.proxy.$Proxy0.execute(Unknown Source)
[01:13:47]: ▸ at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
[01:13:47]: ▸ at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
[01:13:47]: ▸ at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
[01:13:47]: ▸ at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
[01:13:47]: ▸ at org.sonarsource.scanner.cli.Main.main(Main.java:61)

This is my lane:

 lane :metrics do
  scan(
    scheme: "MyScheme",
    clean: true,
    code_coverage: true,
    output_directory: "sonar-reports",
    output_types: "junit,json-compilation-database",
    buildlog_path: "sonar-reports",
    derived_data_path: "sonar-reports",
    use_clang_report_name: true,
    custom_report_file_name: "TEST-report.xml",
    xcargs: "ONLY_ACTIVE_ARCH=YES"
  )
  slather(
    simple_output: true,
    cobertura_xml: true,
    output_directory: "sonar-reports",
    proj: "MyProject.xcodeproj",
    scheme: "MyScheme",
    build_directory: "sonar-reports",
    ignore: ["../../../Applications/Xcode.app/*", "../../../../../Applications/Xcode.app/*", "Vendors/*", "Crashlytics.framework/*"]
  )
  sh(
    "cd .. && lizard . --xml > ./sonar-reports/lizard-report.xml"
  )
  oclint(
    compile_commands: "sonar-reports/compile_commands.json",
    report_type: 'pmd',
    select_regex: /MyProject/,
    max_priority_1: 10,
    max_priority_2: 5000,
    max_priority_3: 50000,
    enable_clang_static_analyzer: false,
    allow_duplicated_violations: false,
    list_enabled_rules: true,
    report_path: "sonar-reports/oclint.xml"
  )
  sonar
  end

NullPointerException when processing JUnit report but test files not included in analysis

When analysing a project with a test report, SurefireParser will process the reports and calls context.saveMeasure on the unit test resources. But if the unit test resources are not published to sonar-scanner via sonar.tests (cmdline or sonar-project.properties file), the unit test resource can't be found and context.saveMeasure will be invoked with null as resource parameter.
This will ultimately crash sonar-scanner.

This plugin should check if the unit test resource can be retrieved before calling context.saveMeasure to prevent the crash.

Tested on SonarQube 5.6.6 and sonar-objective-c plugin 0.6.1.
But will most likely occur on SonarQube 6.x too.

sonar-scanner issues

My ENV:
LLVM (http://llvm.org/):
LLVM version 5.0.0svn-r313528
Optimized build.
Default target: x86_64-apple-darwin17.7.0
Host CPU: skylake

OCLint (http://oclint.org/):
OCLint version 0.13.
Built Sep 18 2017 (08:58:40).

When I used 0.6.2 as a plugin for sonarqube, I run the sonar-scanner -X. Then I got the result below:

15:26:47.198 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.phases.AbstractPhaseExecutor
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)
at org.sonar.core.platform.ComponentContainer.getComponentByType(ComponentContainer.java:265)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:180)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:302)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:297)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:271)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:171)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:128)
at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.filesystem.FileIndexer
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)
... 29 more
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.filesystem.LanguageDetection
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)
... 43 more
Caused by: You must install a plugin that supports the language 'objectivec'

But I can saw the objective-c rules in sonarqube server.
So anyone can help me?

Building master or develop result in SonarQube error

Hi,

I've been struggling with the plugin installation.
When I use the 0.4.0.3 from the release page, and copy it in my plugin folder SonarQube still runs although running run-sonar.sh doesn't work:

Skipping FauxPas (not installed)
Running SonarQube using SonarQube Runner.ERROR: Error during SonarQube Scanner execution
ERROR: Unable to register extension org.sonar.plugins.objectivec.core.ObjectiveCSourceImporter
ERROR: Caused by: org/sonar/api/resources/ProjectFileSystem
ERROR: Caused by: org.sonar.api.resources.ProjectFileSystem
ERROR: 
ERROR: To see the full stack trace of the errors, re-run SonarQube Scanner with the -e switch.
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
ERROR - Command 'sonar-runner ' failed with error code: 1

So I also tried building and deploying it myself from the source. I tried sources on the master and on the develop branch both resulting in breaking SonarQube.
Basically, right after the installation from source (running ./build_and_deploy.sh) I run sonar restart and sonar status and I get SonarQube is not running..

Do you have any idea what could go wrong?
I'm using SonarQube 5.3.

Exception during unit test xml parse: Can not add the same measure twice on key=skipped_tests

18:43:22.967 ERROR: Error during SonarQube Scanner execution
org.sonar.api.utils.XmlParserException: Can not parse surefire reports
	at org.sonar.plugins.objectivec.tests.SurefireParser.parseFiles(SurefireParser.java:137)
	at org.sonar.plugins.objectivec.tests.SurefireParser.collect(SurefireParser.java:78)
	at org.sonar.plugins.objectivec.tests.SurefireSensor.collect(SurefireSensor.java:86)
	at org.sonar.plugins.objectivec.tests.SurefireSensor.analyse(SurefireSensor.java:80)
	at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
	at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
	at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:175)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:262)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:257)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:247)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
	at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
	at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:118)
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:117)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
	at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
	at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.UnsupportedOperationException: Can not add the same measure twice on [key=next]: DefaultMeasure[component=<null>,metric=Metric[id=<null>,key=skipped_tests,description=<null>,type=INT,direction=0,domain=<null>,name=skipped_tests,qualitative=false,userManaged=false,enabled=true,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=false,decimalScale=<null>],value=0,fromCore=false]
	at org.sonar.scanner.sensor.DefaultSensorStorage.saveMeasure(DefaultSensorStorage.java:263)
	at org.sonar.scanner.index.DefaultIndex.addMeasure(DefaultIndex.java:155)
	at org.sonar.scanner.deprecated.DeprecatedSensorContext.saveMeasure(DeprecatedSensorContext.java:126)
	at org.sonar.scanner.deprecated.DeprecatedSensorContext.saveMeasure(DeprecatedSensorContext.java:120)
	at org.sonar.plugins.objectivec.tests.SurefireParser.saveClassMeasure(SurefireParser.java:167)
	at org.sonar.plugins.objectivec.tests.SurefireParser.parseFiles(SurefireParser.java:119)
	... 32 more
18:43:22.968 DEBUG: Execution getVersion
18:43:22.969 DEBUG: Execution stop

Fail to load plugin ObjectiveC [backelitesonarobjectivecplugin] In SonarQube 6.7

Hi,
configure list:
Mac OS 10.13.1
Xcode9.1
SonarQube 6.7(docker)/ SonarQube 6.5(hostmachine)
jdk1.8.1
Before I put this plugin jar in the /plugins, sonarqube worked.
Once I put this plugin jar in the /plugins, sonarqube can not restart success and get some error.
I had tried many ways but not worked, Please help.
java.lang.IllegalStateException: Fail to load plugin ObjectiveC [backelitesonarobjectivecplugin]
at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:88)
at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:531)
at org.sonar.server.platform.Platform.start(Platform.java:231)
at org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:205)
at org.sonar.server.platform.Platform.access$500(Platform.java:46)
at org.sonar.server.platform.Platform$1.lambda$doRun$0(Platform.java:119)
at org.sonar.server.platform.Platform$AutoStarterRunnable.runIfNotAborted(Platform.java:391)
at org.sonar.server.platform.Platform$1.doRun(Platform.java:119)
at org.sonar.server.platform.Platform$AutoStarterRunnable.run(Platform.java:375)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: org/sonar/api/web/CodeColorizerFormat
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at org.sonar.classloader.ClassRealm.loadClassFromSelf(ClassRealm.java:125)
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:37)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
at org.sonar.plugins.objectivec.ObjectiveCPlugin.getExtensions(ObjectiveCPlugin.java:53)
at org.sonar.api.SonarPlugin.define(SonarPlugin.java:51)
at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:78)
... 9 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.sonar.api.web.CodeColorizerFormat
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
... 25 common frames omitted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.