Package org.sonar.iac.common.testing
Class Verifier.TestContext
- java.lang.Object
-
- org.sonar.iac.common.extension.visitors.TreeContext
-
- org.sonar.iac.common.testing.Verifier.TestContext
-
- All Implemented Interfaces:
CheckContext,InitContext
- Enclosing class:
- Verifier
public static class Verifier.TestContext extends TreeContext implements InitContext, CheckContext
-
-
Constructor Summary
Constructors Constructor Description TestContext(org.sonarsource.analyzer.commons.checks.verifier.SingleFileVerifier verifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Tree>
voidregister(Class<T> cls, BiConsumer<CheckContext,T> consumer)voidreportIssue(org.sonar.api.batch.fs.TextRange textRange, String message)voidreportIssue(HasTextRange toHighlight, String message)voidreportIssue(HasTextRange toHighlight, String message, List<SecondaryLocation> secondaryLocations)voidreportIssue(HasTextRange toHighlight, String message, SecondaryLocation secondaryLocations)voidscan(Tree root)-
Methods inherited from class org.sonar.iac.common.extension.visitors.TreeContext
ancestors, before, enter, leave
-
-
-
-
Method Detail
-
scan
public void scan(@Nullable Tree root)
-
register
public <T extends Tree> void register(Class<T> cls, BiConsumer<CheckContext,T> consumer)
- Specified by:
registerin interfaceInitContext
-
reportIssue
public void reportIssue(org.sonar.api.batch.fs.TextRange textRange, String message)- Specified by:
reportIssuein interfaceCheckContext
-
reportIssue
public void reportIssue(HasTextRange toHighlight, String message)
- Specified by:
reportIssuein interfaceCheckContext
-
reportIssue
public void reportIssue(HasTextRange toHighlight, String message, SecondaryLocation secondaryLocations)
- Specified by:
reportIssuein interfaceCheckContext
-
reportIssue
public void reportIssue(HasTextRange toHighlight, String message, List<SecondaryLocation> secondaryLocations)
- Specified by:
reportIssuein interfaceCheckContext
-
-