Rules

Rules are a specific type of measure. They do not return a numeric value like other measures, but the location within the source code where the rule was broken. Squore does not define any rule by itself, but requires a mapping between the rules defined in the external tools[2] that provide the compliance measure and internal concepts (and properties files).

An example of rule definition is provided below:

<Measure 
    measureId="R_NOGOTO" 
    type="RULE" 
    categories="SCALE_SEVERITY.REQUIRED;SCALE_PRIORITY.HIGH" 
    families="REQUIRED;ANALYSABILITY;MISRA;CF;STRP" 
    targetArtefactTypes="FUNCTION" 
    defaultValue="0" />

The attributes allowed for the Measure element of type rule are as follows:



[2] Many Data Providers provide rule compliance measures: Checkstyle, Checker, FindBugs, etc.