Contents > 8 Defining Custom Design Metrics and Rules > 8.3 Definition of Design Rules > 8.3.6 Exempting Approved Rule Violations

8.3.6 Exempting Approved Rule Violations

As described in Section 4.7.2 "Accepting Design Rule Violations", the SDMetrics rule checker uses tagged values or comments to exempt a particular model element from a particular rule, so that such an approved violation is no longer reported. Therefore, the rule checker needs to know which model element type stores the tagged values or comments in the SDMetrics metamodel, and how to access their contents.

This information is specified in two attributes of the XML root element of the metric definition file, for example:

<sdmetrics version="2.1" ruleexemption="taggedvalue"
  exemptiontag="tagname" >
  ...
The above example defines that tagged values are contained in meta model element "taggedvalue", which has an attribute or metric "tagname" that stores the tag.