How to ignore checkstyle on methods according to a specific pattern
Is there a way for the checkstyle rule MethodLength
to set a pattern for methods to be ignored? I want to suppress the checkstyle rule for all methods named getMetaInformation()
.
Other checkstyle rules like LineLength
have the property
<property name="ignorePattern" value=""/>
but this seems not to be available for the MethodLength
rule (see http://checkstyle.sourceforge.net/apidocs/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.html).
目前,无法通过检查配置http://checkstyle.sourceforge.net/config_sizes.html#MethodLength来执行此操作,因此您需要使用抑制/过滤器来执行此操作。
链接地址: http://www.djcxy.com/p/92626.html