Package org.sonar.iac.common.reports
Class AbstractJsonReportImporter
- java.lang.Object
-
- org.sonar.iac.common.reports.AbstractJsonReportImporter
-
public abstract class AbstractJsonReportImporter extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.sonar.api.batch.sensor.SensorContextcontextprotected static org.sonarsource.analyzer.commons.internal.json.simple.parser.JSONParserjsonParser
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractJsonReportImporter(org.sonar.api.batch.sensor.SensorContext context, AnalysisWarningsWrapper analysisWarnings, String warningPrefix)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddUnresolvedPath(String path)protected static intasInt(Object o)voidimportReport(File reportFile)protected org.sonar.api.batch.fs.InputFileinputFile(String filename)protected voidlogWarning(String message)protected org.sonarsource.analyzer.commons.internal.json.simple.JSONArrayparseFileAsArray(File reportFile)protected List<org.sonarsource.analyzer.commons.internal.json.simple.JSONArray>parseJson(File reportFile)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)
-
-
-
Constructor Detail
-
AbstractJsonReportImporter
protected AbstractJsonReportImporter(org.sonar.api.batch.sensor.SensorContext context, AnalysisWarningsWrapper analysisWarnings, String warningPrefix)
-
-
Method Detail
-
importReport
public void importReport(File reportFile)
-
parseJson
protected List<org.sonarsource.analyzer.commons.internal.json.simple.JSONArray> parseJson(File reportFile)
-
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
protected void logWarning(String message)
-
addUnresolvedPath
protected void addUnresolvedPath(String path)
-
asInt
protected static int asInt(Object o)
-
inputFile
protected org.sonar.api.batch.fs.InputFile inputFile(@Nullable String filename)
-
-