Java – how to ignore checkstyles on methods based on specific patterns

Does the checkstyle rule methodlength have a way to set the mode for the method to be ignored? I want to disable the checkstyle rule for all methods named getmetainformation()

Other checkstyle rules such as linelength have this attribute

< property name =“ignorePattern”value =“”/>

But this does not seem to apply to the methodlengthrule (see http://checkstyle.sourceforge.net/apidocs/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.html ).

Solution

Currently, through check config http://checkstyle.sourceforge.net/config_sizes.html#MethodLength This operation cannot be performed. You need to use suppression / filter to perform this operation

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>