circle-exclamation
This version of the SonarQube documentation is no longer maintained. It relates to a version of SonarQube that is not active.

Importing third-party issues

This page lists analysis parameters related to the import of issues raised by external, third-party analyzers.

This page lists analysis parameters related to the import of issues raised by external, third-party analyzers. If your analyzer isn’t on this page, see the Generic issue import format for a generic way to import external issues. You can also import Importing issues from SARIF reports.

SonarQube doesn’t run your external analyzers or generate reports. It only imports pre-generated reports. Below you’ll find language- and tool-specific analysis parameters for importing reports generated by external analyzers.

We recommend checking out the guidesarrow-up-right category of the SonarSource community forumarrow-up-right, where you might find instructions on generating these reports.

Importing reports from third-party tools

Some properties support the following wildcards in paths. The remarks for properties that support wildcards will mention that fact. If the remarks do not say wildcards are supported, then they are not.:

Symbol

Meaning

?

a single character

*

any number of characters

**

any number of directories

List of properties

Unless otherwise specified, the following properties accept both absolute paths and paths relative to the project root.

Language

Property

Remarks

Apex

sonar.apex.pmd.reportPaths

Comma-delimited list of paths to PMD Apexarrow-up-right

Cloudformation

sonar.cloudformation.cfn-lint.reportPaths

Comma-delimited list of paths to AWS CloudFormation Linterarrow-up-right reports in JSON format

CSS

sonar.css.stylelint.reportPaths

Comma-delimited list of paths to StyleLint.ioarrow-up-right reports

Docker

sonar.docker.hadolint.reportPaths

Comma-delimited list of paths to Hadolintarrow-up-right reports in JSON and `sonarqube` format

Go

sonar.go.govet.reportPaths

Comma-delimited list of paths to GoVetarrow-up-right reports

Go

sonar.go.golint.reportPaths

Comma-delimited list of paths to GoLintarrow-up-right reports

Go

sonar.go.gometalinter.reportPaths

Comma-delimited list of paths to GoMetaLinterarrow-up-right reports

Go

sonar.go.golangci-lint.reportPaths

Comma-delimited list of paths to golangci-lintarrow-up-right reports in checkstyle format (use --out-format checkstyle golangci-lint option). Depending on how many issues you’re importing, you might want to disable the max-issues-per-linter option in your golangci config filearrow-up-right.

Go

sonar.externalIssuesReportPaths

Comma-delimited list of paths to gosecarrow-up-right reports in SonarQube format (use -fmt=sonarqube gosec option). Note: this property is the one from the Generic issue import format

Java

sonar.java.spotbugs.reportPaths

Comma-delimited list of paths to reports from SpotBugsarrow-up-right, FindSecBugs, or FindBugs

Java

sonar.java.pmd.reportPaths

Comma-delimited list of paths to reports from PMDarrow-up-right

Java

sonar.java.checkstyle.reportPaths

Comma-delimited list of paths to reports from Checkstylearrow-up-right

JavaScript

sonar.eslint.reportPaths

Comma-delimited list of paths to JSON ESLintarrow-up-right reports (use -f json ESLint option)

Kotlin

sonar.androidLint.reportPaths

Comma-delimited list of paths to AndroidLint reports

Kotlin

sonar.kotlin.detekt.reportPaths

Comma-delimited list of paths to Detektarrow-up-right reports

Kotlin

sonar.kotlin.ktlint.reportPaths

Comma-delimited list of paths to Ktlintarrow-up-right reports

PHP

sonar.php.psalm.reportPaths

Comma-delimited list of paths to Psalmarrow-up-right reports. Reports should be generated in the Generic issue import format (run Psalm with the option --output-format sonarqube).

PHP

sonar.php.phpstan.reportPaths

Comma-delimited list of paths to PHPStanarrow-up-right reports. Reports should be generated in the PHPStan JSON Output Formatarrow-up-right (use the PHPStan analyse command with the option --error-format=json).

Python

sonar.python.pylint.reportPaths

Comma-delimited list of paths to Pylintarrow-up-right reports (use --output-format=parseablePylint optionarrow-up-right)

Python

sonar.python.bandit.reportPaths

Comma-delimited list of paths to Banditarrow-up-right reports

Python

sonar.python.flake8.reportPaths

Comma-delimited list of paths to Flake8arrow-up-right reports

Python

sonar.python.mypy.reportPaths

Comma-delimited list of paths to Mypyarrow-up-right reports

Ruby

sonar.ruby.rubocop.reportPaths

Comma-delimited list of paths to Rubocoparrow-up-right reports

Scala

sonar.scala.scalastyle.reportPaths

Comma-delimited list of paths to Scalastylearrow-up-right reports

Scala

sonar.scala.scapegoat.reportPaths

Comma-delimited list of paths to Scapegoatarrow-up-right reports in the Scalastyle format

Swift

sonar.swift.swiftLint.reportPaths

Comma-delimited list of paths to SwiftLintarrow-up-right reports in JSON format

Terraform

sonar.terraform.tflint.reportPaths

Comma-delimited list of paths to TFLintarrow-up-right reports in JSON format

TypeScript

sonar.typescript.tslint.reportPaths

Comma-delimited list of paths to TSLintarrow-up-right reports in JSON format (use -t json TSLint option)

External .NET issues

Issues from third-party Roslyn analyzers (including Roslyn analyzers provided by Microsoft) are included in the MSBuild output and imported by default into SonarQube so no properties exist to enable that behavior. Instead, properties are available to adjust the import and to stop importing those issues.

Language

Property

Remarks

C#

sonar.cs.roslyn.ignoreIssues

Set to true to disable import of external issues. Defaults to false.

C#

sonar.cs.roslyn.bugCategories``sonar.cs.roslyn.vulnerabilityCategories``sonar.cs.roslyn.codeSmellCategories

Comma-delimited list of categories whose issues should be classified as Bugs, Vulnerabilities, or Code Smells.

VB.NET

sonar.vbnet.roslyn.ignoreIssues

Set to true to disable import of external issues. Defaults to false.

VB.NET

sonar.vbnet.roslyn.bugCategories``sonar.vbnet.roslyn.vulnerabilityCategories``sonar.vbnet.roslyn.codeSmellCategories

Comma-delimited list of categories whose issues should be classified as Bugs, Vulnerabilities, or Code Smells.

Note that Roslyn issues with an error severity automatically fail the build. We don’t recommend running the Scanner for MSBuild’s end step if the MSBuild step fails for any reason because it will result in an essentially empty analysis.

Limitations

External issues have two important limitations:

  • They cannot be managed within SonarQube; for instance, there is no ability to mark them as false positives.

  • The activation of the rules that raise these issues cannot be managed within SonarQube. External rules are not visible on the Rules page or reflected in any quality profile.

Last updated

Was this helpful?