Checks

There are a number of checks available within CC4M. These can be enabled and configured as described in section Configuration Editor. The checks are explained in the following sections. For every check, an exemption tag is given. For more information about this, see section Exemptions. If a check fails, its results hold the following information:

  • A relative path from the root folder to the file in which the violation was encountered.

  • The part of the code that violates the coding standards including a link.

  • The scope of the failing feature/variable (if appliccable).

  • A message stating why the check failed at that location.

  • A link for quickly adding an exemption for the violation.

  • Rule information.

  • Configured check and parameter values.

Note: In the HTML report at most one violation of the same type per line of code will be shown for several checks, this is indicated per check in the following sections.

Overview

The checks are organized per topic. some checks could be applicable to more topics, but are mentioned just once. The topics are:

Unique identifers

Every check has a unique identifier, that can be used as exemption tag. Below an overview of all exemption tags. The list can be obtained using the command:

tagsTable = monkeyproof.cc4m.getAllExemptions();

The list:

ABSCI    checkAbstractClassInstantiation        
ALFUN    checkAllowedFunctions                  
ASINP    checkAssertInputs                      
AVCOM    checkAvoidComments                     
AVDDT    checkAvoidDatatypes                    
AVFUN    checkAvoidFunctions                    
AVNAM    checkAvoidNames                        
BFCNC    checkBuiltinFunctionCompatibility      
BLCKC    checkBlockComment                      
CARBU    checkArgumentsBlockUsed                
CCFCN    checkCoderCompatibilityFunctionCalls   
CCLAS    checkClassCasing                       
CENME    checkEnumMemberCasing                  
CEVEN    checkEventCasing                       
CFEND    checkFunctionEnd                       
CFIND    checkFunctionIndented                  
CHARA    checkCharacterArray                    
CINDE    checkIndentation                       
CINLE    checkIndentationLength                 
CMETH    checkMethodCasing                      
CNCON    checkNamedConstantCasing               
CNDAT    checkConstantDefinitionAtTop           
CNSTF    checkNestedFunction                    
CNVPC    checkNameValuePairCasing               
COINT    checkCodeInterpretable                 
COLEN    checkCodeLength                        
COMPA    checkComparisons                       
CONAR    checkConcatenateExpandedArray          
COPYR    checkCopyrightNotice                   
COSYN    checkCommandSyntax                     
CPACK    checkPackageCasing                     
CPROP    checkPropertyCasing                    
CSFIE    checkStructFieldCasing                 
CSTFD    checkContiguousStructFieldDefinitions  
CSUBF    checkSubFunction                       
CSUPC    checkSuperclassConflict                
CUDFU    checkUserDefinedFunctionCasing         
CVARI    checkVariableCasing                    
CZBDP    checkZeroBeforeDecimalPoint            
DUPAT    checkDuplicateAttributes               
DYNFI    checkDynamicFields                     
EDWRN    checkEditorWarnings                    
EXPAL    checkExpressionAlignment               
EXERA    checkExemptionsRationale               
FCNPF    checkFunctionPrefix                    
FCTMI    checkFunctionCallExcessInputs          
FOLSP    checkFollowedBySpace                   
GETST    checkGetterAndSetter                   
GLOBU    checkGlobalUsed                        
IDXNA    checkLoopIteratorNaming                
IFELS    checkIfElse                            
IFTRU    checkIfTrue                            
INPAR    checkNoInputArg                        
JAVUS    checkJavaUsed                          
LILEN    checkLineLength                        
LOGOP    checkLogicalOperators                  
MAGNR    checkMagicNumber                       
MCOMM    checkMissingComma                      
MDAMI    checkMethodsInClassdef                 
METAP    checkMethodAccessPermissions           
MIXOT    checkMixedTypesExpression              
MSEMC    checkMissingSemicolon                  
NALEN    checkNameLength                        
NEGBO    checkNegatedBoolean                    
NINOF    checkNumberOfInputsOutputsFunction     
NOOCS    checkNumberOfOutputsConstructor        
NSHAD    checkNameIsShadowing                   
NSTDP    checkNestingDepth                      
OPLCO    checkOperatorsLineContinuation         
OSTPL    checkOneStatementPerLine               
PARLO    checkParenthesesLogicalOperators       
PARMO    checkParenthesesMathematicalOperators  
PBBMB    checkPropertiesBeforeMethods           
PERSU    checkPersistentUsed                    
PRCLR    checkPropertyClassRedundancy           
RCOMP    checkComplexity                       
RDEPE    checkDependencies                     
RMEXF    checkMexFiles                         
RUIVN    checkReuseIteratorVariableName         
SCRFU    checkScriptFileUsed                    
SCXML    checkSecurityXml                       
SECCF    checkSecurityCertificateFilename       
SECCN    checkSecurityConstantNames             
SECUP    checkSecurityUsernamePassword          
SFNAM    checkStructFieldNames                  
SHESC    checkShellEscape                       
STRDT    checkStringDataType                    
SUPAL    checkSuppressAll                       
SUPPI    checkSuperclassPropertyImplementation  
SURSP    checkSurrBySpaces                      
SWOTH    checkSwitchOtherwise                   
TABCU    checkTabCharacterUsed                  
TRYEH    checkTryExceptionHandling              
TRYUS    checkTryUsed                           
TSTSF    checkTestSuffix                        
UIVOL    checkUseIteratorVariableNameOutsideLoop
VARIO    checkAvoidVararginout                  
WARNU    checkWarningUsed                       
WSEOL    checkWhiteSpaceEndOfLine