SeverityMatchFilter

Since Checkstyle 3.2

Description

Filter SeverityMatchFilter decides audit events according to the severity level of the event.

Notes

SeverityMatchFilter can suppress Checks that have Treewalker or Checker as parent module.

Properties

name description type default value since
acceptOnMatch Control whether the filter accepts an audit event if and only if there is a match between the event's severity level and property severity. If acceptOnMatch is false, then the filter accepts an audit event if and only if there is not a match between the event's severity level and property severity. boolean true 3.2
severity Specify the severity level of this filter. SeverityLevel error 3.2

Examples

For example, the following configuration fragment directs the Checker to not report audit events with severity level info:

<module name="Checker">
  <module name="SeverityMatchFilter">
    <property name="severity" value="info"/>
    <property name="acceptOnMatch" value="false"/>
  </module>
</module>
        

Example of Usage

Package

com.puppycrawl.tools.checkstyle.filters

Parent Module

Checker