com.puppycrawl.tools.checkstyle.checks.metrics
Class JavaNCSSCheck
- Configurable, Contextualizable
public class JavaNCSSCheck
This check calculates the Non Commenting Source Statements (NCSS) metric for
java source files and methods. The check adheres to the
JavaNCSS specification
and gives the same results as the JavaNCSS tool.
The NCSS-metric tries to determine complexity of methods, classes and files
by counting the non commenting lines. Roughly said this is (nearly)
equivalent to counting the semicolons and opening curly braces.
- Lars K?dderitzsch
beginTree , destroy , finishTree , getAcceptableTokens , getClassLoader , getDefaultTokens , getFileContents , getLines , getRequiredTokens , getTabWidth , getTokenNames , init , leaveToken , log , log , setClassLoader , setFileContents , setMessages , setTabWidth , setTokens , visitToken |
getMessageBundle , getSeverity , getSeverityLevel , log , log , log , log , log , log , log , log , log , log , log , setSeverity |
setClassMaximum
public void setClassMaximum(int aClassMax)
Sets the maximum ncss for a class.
aClassMax
- the maximum ncss
setFileMaximum
public void setFileMaximum(int aFileMax)
Sets the maximum ncss for a file.
aFileMax
- the maximum ncss
setMethodMaximum
public void setMethodMaximum(int aMethodMax)
Sets the maximum ncss for a method.
aMethodMax
- the maximum ncss