diff --git a/src/checkstyle/checks/size/MethodCountCheck.hx b/src/checkstyle/checks/size/MethodCountCheck.hx index e626325b..1b84a34f 100644 --- a/src/checkstyle/checks/size/MethodCountCheck.hx +++ b/src/checkstyle/checks/size/MethodCountCheck.hx @@ -26,7 +26,7 @@ class MethodCountCheck extends Check { override function actualRun() { var root:TokenTree = checker.getTokenTree(); - var acceptableTokens:Array = root.filter([Kwd(KwdFunction)], ALL); + var acceptableTokens:Array = root.filter([Kwd(KwdFunction)], FIRST); if (acceptableTokens.length > maxTotal) { log('Total number of methods is ${acceptableTokens.length} (max allowed is ${maxTotal})', 0, 0);