Dear Oliver Burn and all developers.
I wrote a patch to evaluate the violation with its size of violation.
At present, we can use severity 'info', 'warning', 'error' to evaluate violation.
But more detailed evaluation is needed to represent severity for the case below.
Case 1. The number of line of java source code is 2001.
Case 2. The number of line of java source code is 2501.
Case 3. The number of line of java source code is 3000.
Case 4. The number of line of java source code is 5000.
For all case, Checkstyle5.6 in FileLengthCheck will say they are all 'error'.
But Case 1 should be treated as slight and Case 5 should be treated as serious one.
With this patch, user can get score for each violation as its severity
(info = 2, warning = 5, error = 17) and size of violation if the check is one of below
or square of size of violation if the check is CyclomaticComplexity.
(I believe this is one of the most important check all other check.
This violation should be reported as seriously.)
User can configure severity score such as info = 5, warning = 11, as default
setting for all check or configure for each check.
User can configure the logic to calculate score for each check such as
'severity', 'size of violation', 'square of size of violation'
User can also configure designed score for each check.
I attached zip file which have mychanges.patch via 'hg diff > mychanges.patch'
and Scoring.java. this java file is new one and should be copied under
I choose 2, 5, 17 as default score for each severity.
Because those number should be prime number and I like it! :)