JavaNCSS: reduce limits by 20%

This commit is contained in:
Paul Campbell 2016-09-05 07:55:40 +01:00
parent 3cc5a02dd6
commit 02a755f378
2 changed files with 6 additions and 8 deletions

View file

@ -1249,16 +1249,10 @@ Checks the format for Javadoc for classes and enums. Javadoc must be present, no
#### [JavaNCSS](http://checkstyle.sourceforge.net/config_metrics.html#JavaNCSS)
Restricts the NCSS score for methods, classes and files to 50, 1500 and 2000 respectively. The NCSS score is a measure of the number of statements within a scope.
Restricts the NCSS score for methods, classes and files to 40, 1200 and 1600 respectively. The NCSS score is a measure of the number of statements within a scope.
Too high an NCSS score suggests that the method or class is doing too much and should be decomposed into smaller units.
> TODO: methodMaximum = 40 - reduce by 20%
> TODO: classMaximum = 1200
> TODO: fileMaximum = 1600
#### [LeftCurly](http://checkstyle.sourceforge.net/config_blocks.html#LeftCurly)
Checks that the left curly brace ('{') is placed at the end of the line. Does not check enums.

View file

@ -107,7 +107,11 @@
<module name="JavadocType"> <!-- javadoc is present for classes, interfaces and enums -->
<property name="authorFormat" value="^.+ (\S+@[\S.]+)$"/> <!-- name followed by email in brackets -->
</module>
<module name="JavaNCSS"/> <!-- Non-Commenting Source Statements complexity analysis -->
<module name="JavaNCSS"> <!-- Non-Commenting Source Statements complexity analysis -->
<property name="methodMaximum" value="40"/> <!-- lines per methods -->
<property name="classMaximum" value="1200"/> <!-- lines per class -->
<property name="fileMaximum" value="1600"/> <!-- lines per file -->
</module>
<module name="LeftCurly"/> <!-- placement of left curly braces ('{') for code blocks at end of line -->
<module name="LineLength"> <!-- lines can't be longer the 120 -->