Interface InputFileScannerContext
- All Superinterfaces:
ModuleScannerContext
- All Known Subinterfaces:
JavaFileScannerContext
- All Known Implementing Classes:
DefaultInputFileScannerContext
,DefaultJavaFileScannerContext
,JavaFileScannerContextForTests
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Report an issue on a specific line.void
Report an issue on a specific line.void
addIssueOnFile
(JavaCheck check, String message) Report an issue at file level.org.sonar.api.batch.fs.InputFile
InputFile under analysis.Methods inherited from interface org.sonar.plugins.java.api.ModuleScannerContext
addIssueOnProject, getCacheContext, getJavaVersion, getModuleKey, getProject, getRootProjectWorkingDirectory, getWorkingDirectory, inAndroidContext, sonarProduct
-
Method Details
-
addIssueOnFile
-
addIssue
Report an issue on a specific line. PreferJavaFileScannerContext.reportIssue(JavaCheck, Tree, String)
for more precise reporting.- Parameters:
line
- line on which to report the issuecheck
- The check raising the issue.message
- Message to display to the user
-
addIssue
Report an issue on a specific line. PreferJavaFileScannerContext.reportIssue(JavaCheck, Tree, String, List, Integer)
for more precise reporting.- Parameters:
line
- line on which to report the issuecheck
- The check raising the issue.message
- Message to display to the usercost
- computed remediation cost if applicable, null if not.
-
getInputFile
org.sonar.api.batch.fs.InputFile getInputFile()InputFile under analysis.- Returns:
- the currently analyzed
InputFile
. - Since:
- SonarJava 5.12: Dropping support of file-related methods
-