Package org.sonar.api.scan.issue.filter
Interface IssueFilter
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@ScannerSide @SonarLintSide @ExtensionPoint @FunctionalInterface @ThreadSafe @Deprecated public interface IssueFilter
Deprecated.since 7.6- Since:
- 5.3, 7.6 moved to project container
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description boolean
accept(FilterableIssue issue, IssueFilterChain chain)
Deprecated.Theaccept
method is called for eachFilterableIssue
created during analysis, to check if it has to be persisted.
-
-
-
Method Detail
-
accept
boolean accept(FilterableIssue issue, IssueFilterChain chain)
Deprecated.Theaccept
method is called for eachFilterableIssue
created during analysis, to check if it has to be persisted. Examples of use cases are:- Ignoring or enforcing rules on specific resources
- Switching-off an issue based on its context (
//NOSONAR
comments, semantic annotations)
chain
parameter allows for fine control of the filtering logic: it is each filter's duty to either pass the issue to the next filter, by calling theIssueFilterChain.accept(org.sonar.api.scan.issue.filter.FilterableIssue)
method, or return directly if the issue has to be accepted or not Implementations should be thread safe.- Parameters:
issue
- the issue being filteredchain
- the rest of the filters- Returns:
true
to accept the issue,false
to reject it,IssueFilterChain.accept(org.sonar.api.scan.issue.filter.FilterableIssue)
to let the other filters decide.
-
-