Package org.sonar.java.checks.verifier
Class MultipleFilesJavaCheckVerifier
- java.lang.Object
-
- org.sonar.java.checks.verifier.CheckVerifier
-
- org.sonar.java.checks.verifier.MultipleFilesJavaCheckVerifier
-
@Beta public class MultipleFilesJavaCheckVerifier extends CheckVerifier
Please read the documentation of @see org.sonar.java.checks.verifier.JavaCheckVerifier The main difference is that this class run a check on multiple files and verifies the results at the end of analysis.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.sonar.java.checks.verifier.CheckVerifier
CheckVerifier.IssueAttribute
-
-
Field Summary
-
Fields inherited from class org.sonar.java.checks.verifier.CheckVerifier
ATTRIBUTE_MAP, ISSUE_MARKER
-
-
Constructor Summary
Constructors Constructor Description MultipleFilesJavaCheckVerifier()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetExpectedIssueTrigger()static voidverify(List<String> filesToScan, JavaFileScanner check)Verifies that all the expected issues are raised after analyzing all the given files with the given check.static voidverifyNoIssue(List<String> filesToScan, JavaFileScanner check)Verifies that no issues are raised after analyzing all the given files with the given check.static voidverifyNoIssueWithoutSemantic(List<String> filesToScan, JavaFileScanner check)Verifies that no issues are raised after analyzing all given files with the given check when semantic is not available.-
Methods inherited from class org.sonar.java.checks.verifier.CheckVerifier
checkIssues, collectExpectedIssues, expectNoIssues, getExpected, setExpectedFileIssue, setExpectedProjectIssue
-
-
-
-
Method Detail
-
verify
public static void verify(List<String> filesToScan, JavaFileScanner check)
Verifies that all the expected issues are raised after analyzing all the given files with the given check.
By default, any jar or zip archive present in the folder defined byJavaCheckVerifier.DEFAULT_TEST_JARS_DIRECTORYwill be used to add extra classes to the classpath. If this folder is empty or does not exist, then the analysis will be based on the source of the provided file.- Parameters:
filesToScan- The files to be analyzedcheck- The check to be used for the analysis
-
verifyNoIssue
public static void verifyNoIssue(List<String> filesToScan, JavaFileScanner check)
Verifies that no issues are raised after analyzing all the given files with the given check.- Parameters:
filesToScan- The files to be analyzedcheck- The check to be used for the analysis
-
verifyNoIssueWithoutSemantic
public static void verifyNoIssueWithoutSemantic(List<String> filesToScan, JavaFileScanner check)
Verifies that no issues are raised after analyzing all given files with the given check when semantic is not available.- Parameters:
filesToScan- The files to be analyzedcheck- The check to be used for the analysis
-
getExpectedIssueTrigger
public String getExpectedIssueTrigger()
- Specified by:
getExpectedIssueTriggerin classCheckVerifier
-
-