ParameterNumber: don't apply limit to overridden methods

This commit is contained in:
Paul Campbell 2016-09-05 17:45:38 +01:00
parent d63620c9b4
commit 14462f9ea4
2 changed files with 4 additions and 4 deletions

View file

@ -1728,9 +1728,7 @@ Identifiers must match `^[a-z][a-zA-Z0-9]*$`.
#### [ParameterNumber](http://checkstyle.sourceforge.net/config_sizes.html#ParameterNumber)
Restricts the number of parameters in a method or constructor to 7.
> TODO: ignoreOverriddenMethods = true
Restricts the number of parameters in a method or constructor to 7. Overridden methods are not checked as there may be no access to change the super method.
#### [ParenPad](http://checkstyle.sourceforge.net/config_whitespace.html#ParenPad)

View file

@ -169,7 +169,9 @@
<property name="format" value="^[a-z]+(\.[a-z]+)*$"/> <!-- only lowercase letters, no numbers of underscores -->
</module>
<module name="ParameterName"/> <!-- validate parameter name format -->
<module name="ParameterNumber"/> <!-- limits the number of parameters to 7 -->
<module name="ParameterNumber"> <!-- limits the number of parameters to 7 -->
<property name="ignoreOverriddenMethods" value="true"/> <!-- don't apply to @Overridden -->
</module>
<module name="ParenPad"/> <!-- parentheses should have no padding spaces -->
<module name="RedundantImport"/> <!-- checks for redundant imports (i.e. in the same package) -->