Skip to contents

Generates a JSON file compatible with the Generic Issue Import format of SonarQube. Allows injecting lintr results into an existing SonarQube/SonarCloud instance via the sonar.externalIssuesReportPaths property.

Usage

export_sonar_json(x, output = "sonar-issues.json")

Arguments

x

An rsonar_result object returned by sonar_analyse().

output

Path to the output JSON file. Default "sonar-issues.json".

Value

The path to the generated JSON file (invisibly).

Examples

if (FALSE) { # \dontrun{
res <- sonar_analyse(".")
export_sonar_json(res, "sonar-issues.json")
} # }