Invokes sonar-scanner to programmatically run SonarQube analysis
See http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner for details.
It can process unit test results if formatted as junit report as shown in xctest action. It can also integrate coverage reports in Cobertura format, which can be transformed into by the slather action.
|Supported platforms||ios, android, mac|
|Returns||The exit code of the sonar-scanner binary|
sonar( project_key: "name.gretzki.awesomeApp", project_version: "1.0", project_name: "iOS - AwesomeApp", sources_path: File.expand_path("../AwesomeApp") )
||The path to your sonar project configuration file; defaults to
||The key sonar uses to identify the project, e.g.
||The name of the project that gets displayed on the sonar report page. Must either be specified here or inside the sonar project configuration file|
||The project's version that gets displayed on the sonar report page. Must either be specified here or inside the sonar project configuration file|
||Comma-separated paths to directories containing source files. Must either be specified here or inside the sonar project configuration file|
||Language key, e.g. objc|
||Used encoding of source files, e.g., UTF-8|
||Pass additional arguments to sonar-scanner. Be sure to provide the arguments with a leading
||Pass the Sonar Login token (e.g: xxxxxxprivate_token_XXXXbXX7e)|
||Pass the url of the Sonar server|
* = default value is dependent on the user's system
To show the documentation in your terminal, run
fastlane action sonar
It is recommended to add the above action into your
Fastfile, however sometimes you might want to run one-offs. To do so, you can run the following command from your terminal
fastlane run sonar
To pass parameters, make use of the
: symbol, for example
fastlane run sonar parameter1:"value1" parameter2:"value2"
It's important to note that the CLI supports primative types like integers, floats, booleans, and strings. Arrays can be passed as a comma delimited string (e.g.
param:"1,2,3"). Hashes are not currently supported.
It is recommended to add all fastlane actions you use to your
This action, just like the rest of fastlane, is fully open source, view the source code on GitHub