Package org.sonar.iac.common.reports
Class AbstractJsonReportImporter
java.lang.Object
org.sonar.iac.common.reports.AbstractJsonReportImporter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.sonar.api.batch.sensor.SensorContextprotected static final org.sonarsource.analyzer.commons.internal.json.simple.parser.JSONParser -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractJsonReportImporter(org.sonar.api.batch.sensor.SensorContext context, AnalysisWarningsWrapper analysisWarnings, String warningPrefix) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddUnresolvedPath(String path) protected static intvoidimportReport(File reportFile) protected org.sonar.api.batch.fs.InputFileprotected voidlogWarning(String message) protected org.sonarsource.analyzer.commons.internal.json.simple.JSONArrayparseFileAsArray(File reportFile) protected List<org.sonarsource.analyzer.commons.internal.json.simple.JSONArray>protected intsaveIssues(org.sonarsource.analyzer.commons.internal.json.simple.JSONArray issuesJson) protected abstract org.sonar.api.batch.sensor.issue.NewExternalIssuetoExternalIssue(org.sonarsource.analyzer.commons.internal.json.simple.JSONObject issueJson)
-
Field Details
-
jsonParser
protected static final org.sonarsource.analyzer.commons.internal.json.simple.parser.JSONParser jsonParser -
context
protected final org.sonar.api.batch.sensor.SensorContext context
-
-
Constructor Details
-
AbstractJsonReportImporter
protected AbstractJsonReportImporter(org.sonar.api.batch.sensor.SensorContext context, AnalysisWarningsWrapper analysisWarnings, String warningPrefix)
-
-
Method Details
-
importReport
-
parseJson
-
parseFileAsArray
protected org.sonarsource.analyzer.commons.internal.json.simple.JSONArray parseFileAsArray(File reportFile) throws IOException, org.sonarsource.analyzer.commons.internal.json.simple.parser.ParseException - Throws:
IOExceptionorg.sonarsource.analyzer.commons.internal.json.simple.parser.ParseException
-
saveIssues
protected int saveIssues(org.sonarsource.analyzer.commons.internal.json.simple.JSONArray issuesJson) -
toExternalIssue
protected abstract org.sonar.api.batch.sensor.issue.NewExternalIssue toExternalIssue(org.sonarsource.analyzer.commons.internal.json.simple.JSONObject issueJson) -
logWarning
-
addUnresolvedPath
-
asInt
-
inputFile
-