org.sonar.api.issue.batch
Interface IssueFilter

All Superinterfaces:
BatchComponent, BatchExtension, Extension
All Known Implementing Classes:
NoSonarFilter

public interface IssueFilter
extends BatchExtension

An issue filter is an object that allows filtering of Issues on batch side, preventing them from being persisted.

Since:
4.0

Method Summary
 boolean accept(Issue issue, IssueFilterChain chain)
          The accept method is called for each Issue created during analysis, to check if it has to be persisted.
 

Method Detail

accept

boolean accept(Issue issue,
               IssueFilterChain chain)
The accept method is called for each Issue created during analysis, to check if it has to be persisted. Examples of use cases are: The 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 the IssueFilterChain.accept(org.sonar.api.issue.Issue) method, or return directly if the issue has to be accepted or not

Parameters:
issue - the issue being filtered
chain - the rest of the filters
Returns:
true to accept the issue, false to reject it, IssueFilterChain.accept(org.sonar.api.issue.Issue) to let the other filters decide.


Copyright © 2009-2014 SonarSource. All Rights Reserved.