scalastyle/scalastyle — pull request #60 by gshakhn (2013-06-21 02:30:42+00:00)
Title: Add more info to cyclomatic complexity message.

The old message just gave the max allowed cyclomatic complexity. This
made it difficult to figure out how much a method needed to be broken
up without rerunning scalastyle after each refactor to check how much
the complexity had changed.

The new message gives the current complexity and the max complexity.

This change requires that AbstractMethodChecker.params be computed
dynamically based on the BaseClazz[AstNode] being matched. In
CyclomaticComplexityChecker, the calculation of the complexity is
moved to a separate method so that it can be used to calculate the
params.

A similar change can be done for NumberOfMethodsInTypeChecker, but it's
much easier to find the number of methods in a class than the
cyclomatic complexity of a method, so the change isn't as beneficial.
It should be easy to do if there is desire though.