core/com.nokia.carbide.cpp.codescanner/html/customizing_cs.htm
author cawthron
Mon, 24 May 2010 15:37:56 -0500
branchC3_BUILDER_WORK
changeset 1393 42f6165e68df
parent 128 c028612cc555
permissions -rw-r--r--
write .branch.txt to make the new head

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head>
<title>Customizing CodeScanner Rules</title>
<link rel="StyleSheet" href="../book.css" type="text/css"/>
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
</head>
   <body>
   <div class="Head1">
<h2>Customizing CodeScanner Rules</h2>
</div>
   <p> The CodeScanner command line tool currently accepts an XML configuration file, which controls scanning behavior, like the file types to ignore and which rules to apply. Using the elements contained here makes it possible to customize the scanning rules to include new rules unique to your development environment.</p>
   <p>This page describes the format of CodeScanner config file (<span class="code">codescannerconfig.xml</span>), which is used for the following purposes: </p>
   <ul>
     <li>Controls scanning behavior of the CodeScanner command line tool</li>
     <li> Importing/exporting rules and file types from CodeScanner preference pages in Carbide.c++ IDE </li>
   </ul>
   <h2>CODESCANNERCONFIG.XML File</h2>
   <p>The CodeScanner config file is an XML formatted file created by CodeScanner when a scan is performed or when the CodeScaner preference settings are <a href="pref_codescanner_01.htm">exported</a>. The file  contains the following elements: </p>
   <ul>
     <li><a href="#ARG_Element">Arguments</a> element &ndash; specifies the arguments to be passed to CodeScanner</li>
     <li><a href="#SRC_Element">Sources</a> element &ndash; specifies the file types to be ignored by CodeScanner</li>
     <li><a href="#SCRIPT_Element">Scripts</a> element &ndash; specifies the rules to be applied by CodeScanner</li>
     <li><a href="#SEV_Element">Severities</a> element &ndash; specifies the severity levels of rules to be applied by CodeScanner</li>
     <li><a href="#CAT_Element">Categories</a> element &ndash; specifies the categories of rules to be applied by CodeScanner</li>
     <li><a href="#RULE_Element">CustomRules</a> element &ndash; specifies user defined rules to be applied by CodeScanner</li>
   </ul>
   <h4><a name="ARG_Element" id="ARG_Element"></a>Arguments Element</h4>
   <p>Each Arguments element contains one or more of the following arguments: </p>
   <ul>
     <li><b>Input</b> element (<span class="code">&lt;input&gt;</span>, <span class="code">&lt;/input&gt;</span>) &ndash; Specify an additional directory or file to scan. </li>
     <li><b>Outputformat</b> element (<span class="code">&lt;outputformat&gt;</span>, <span class="code">&lt;/outputformat&gt;</span>) &ndash; Specify the output format(s) of the results generated by CodeScanner. Currently the following output formats are supported: 
       <ul>
         <li>html &ndash; generate HTML report</li>
         <li> xml &ndash; generate an XML report</li>
         <li> std &ndash; generate messages in standard console output</li>
       </ul>
     </li>
     <li><b>LXR</b> element (<span class="code">&lt;lxr&gt;</span>, <span class="code">&lt;/lxr&gt;</span>) &ndash;  Specify the URL to an LXR site. When this argument is present, CodeScanner  generates links to the specified LXR site instead of the local file system. </li>
     <li><b>LXR version</b> element (<span class="code">&lt;lxrversion&gt;</span>, <span class="code">&lt;/lxrversion&gt;</span>) &ndash; Specify the LXR version when generating links to an LXR site. </li>
     <li><b>Timestampedoutput</b> element (<span class="code">&lt;timestampedoutput&gt;</span>, <span class="code">&lt;/timestampedoutput&gt;</span>) &ndash; Specify whether to generate results in a time-stamped output directory. Supported values are on and off. </li>
   </ul>
   <p>An example of an Arguments element: </p>
   <p class="listing">&lt;arguments&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;input&gt;C:\Symbian\9.2\Epoc32\include&lt;/input&gt;<br />
    &nbsp;&nbsp;&nbsp;&nbsp;&lt;input&gt;C:\CodeScanner_Tests\includes&lt;/input&gt;   <br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;lxr&gt;http://s60lxr/source/&lt;/lxr&gt;   <br />
     &nbsp;&nbsp;&nbsp;
   &lt;lxrversion&gt;S60_3_2_200736&lt;/lxrversion&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;outputformat&gt;html|std&lt;/outputformat&gt;   <br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;timestampedoutput&gt;on&lt;/timestampedoutput&gt; <br />
   &lt;/arguments&gt; </p>
   <h4><a name="SRC_Element" id="ARG_Element2"></a>Sources Element</h4>
   <p>Each Sources element can contain one or more Excludes elements. </p>
   <ul>
     <li><b>Excludes</b> element (<span class="code">&lt;excludes&gt;</span>, <span class="code">&lt;/excludes&gt;</span>) &ndash; Each Excludes element contains a string, which is a regular expression that specifies a file type to be ignored by CodeScanner. </li>
   </ul>
   <p>An example of a Sources element: </p>
   <p class="listing">&lt;sources&gt;     <br />
     &nbsp;&nbsp;&nbsp;&nbsp;&lt;exclude&gt;.*\.avi&lt;/exclude&gt;     <br />
     &nbsp;&nbsp;&nbsp;&nbsp;&lt;exclude&gt;.*\.bmp&lt;/exclude&gt;     <br />
     &nbsp;&nbsp;&nbsp;&nbsp;&lt;exclude&gt;.*\.jpg&lt;/exclude&gt;     <br />
     &nbsp;&nbsp;&nbsp;&nbsp;&lt;exclude&gt;.*\\test\\.*&lt;/exclude&gt; <br />
   &lt;/sources&gt; </p>
   <h4><a name="SCRIPT_Element" id="ARG_Element3"></a>Scripts Element</h4>
   <p>Each Scripts element can contain one or more Script elements, each of which corresponds to a CodeScanner script (each script applies a CodeScanner rule): </p>
   <ul>
     <li><b>Script</b> element The name of each Script element matches the name of the corresponding rule, e.g. baseconstruct, forbiddenwords, magicnumbers. Each Script element has the following attributes: 
       <ul>
         <li>enable (boolean) &ndash; specifies whether a script is enabled by CodeScanner</li>
         <li>severity (string) &ndash; specifies the severity level of a script</li>
         <li>category (string) &ndash; specifies the category of a script</li>
       </ul>In addition, certain script elements also have special child element or attribute: 
     </li>
       <ul>
         <li><b>wordsRE</b> element (<span class="code">&lt;wordsRE&gt;</span>, <span class="code">&lt;/wordsRE&gt;</span>) &ndash; Specify the child element of the forbiddenwords script element. The wordsRE element contains a string, which is a regular expression that specifies the forbidden words detected by the forbiddenwords script.</li>
         <li><b>length</b> attribute &ndash; Attribute of the longlines script element. The length attribute is a string that specifies the maximum length of a line of code, beyond which the longlines script flags as a problem. </li>
         <li><b>LFunctionIgnoreRE</b> element (<span class="code">&lt;LFunctionIgnoreRE&gt;</span>, <span class="code">&lt;/LFunctionIgnoreRE&gt;</span>) &ndash; Specify the child element of the LFunctionCantLeave script element. The LFunctionIgnoreRE element contains a string, which is a regular expression that specifies the L-functions to be ignored by the LFunctionCantLeave script when checking for L-functions inside cannot leave. </li>
         <li><b>cclassIgnoreRE</b> element (<span class="code">&lt;cclassIgnoreRE&gt;</span>, <span class="code">&lt;/cclassIgnoreRE&gt;</span>) &ndash; Specify the child element of the missingcclass script element. The cclassIgnoreRE element contains a string, which is a regular expression that specifies the classes to be ignored by the missingcclass script when checking for C classes not inheriting from other C classes.</li>
         <li><b>openIgnoreRE</b> element (<span class="code">&lt;openIgnoreRE&gt;</span>, <span class="code">&lt;/openIgnoreRE&gt;</span>) &ndash; Specify the child element of this open script element. The openIgnoreRE element contains a string, which is a regular expression that specifies the classes or objects to be ignored by the open script when checking for ignored return type from Open(). </li>
         <li><b>worryRE</b> element (<span class="code">&lt;worryRE&gt;</span>, <span class="code">&lt;/ worryRE&gt;</span>) &ndash; Child element of the worryingcomments script element. The worryRE element contains a string, which is a regular expression that specifies the worrying comments detected by the worryingcomments script. </li>
     </ul>     
   </ul>
   <p>Complete list of currently supported Script elements with default attributes: </p>
   <p class="listing">&lt;scripts&gt;<br />
     <br />
&lt;accessArrayElementWithoutCheck category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;<br />
&lt;accessArrayElementWithoutCheck2 category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;activestart category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;activestop category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;arraypassing category=&quot;performance&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
&lt;arrayptrcleanup category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;assertdebuginvariant category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;<br />
<br />
&lt;baddefines category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;baseconstruct category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;<br />
<br />
&lt;callActiveObjectWithoutCheckingOrStopping category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   &lt;changenotification category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;cleanup category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;commentcode category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;connect category=&quot;canpanic&quot; enable=&quot;true&quot; severity=&quot;high&quot;/&gt;   <br />
&lt;ConnectAndDontCloseMemberVariable category=&quot;functionality&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   &lt;constnames category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;consttdescptr category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;controlornull category=&quot;canpanic&quot; enable=&quot;true&quot; severity=&quot;high&quot;/&gt;   <br>
&lt;crepository category=&quot;other&quot;                   enable=&quot;true&quot;                   severity=&quot;low&quot;/&gt;<br />
&lt;ctltargettype category=&quot;functionality&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
&lt;customizableicons category=&quot;other&quot;                         enable=&quot;true&quot;                         severity=&quot;low&quot;&gt;<br>
	&nbsp;&nbsp;&nbsp;&nbsp;&lt;iconsRE&gt;iconA.bmp|iconB.svg|iconC&lt;/iconsRE&gt;     <br>
	&lt;/customizableicons&gt;<br>
<br />
&lt;debugrom category=&quot;performance&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
&lt;declarename category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;deleteMemberVariable category=&quot;canpanic&quot; enable=&quot;true&quot; severity=&quot;high&quot;/&gt;   <br />
&lt;destructor category=&quot;canpanic&quot; enable=&quot;true&quot; severity=&quot;high&quot;/&gt;   <br />
&lt;doubleSemiColon category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;driveletters category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
  <br />
&lt;eikbuttons category=&quot;localisation&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
&lt;eikonenvstatic category=&quot;performance&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
&lt;enummembers category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;enumnames category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;exportinline category=&quot;functionality&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
&lt;exportpurevirtual category=&quot;functionality&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
  <br />
&lt;flags category=&quot;other&quot;             enable=&quot;true&quot;             severity=&quot;low&quot;/&gt;<br>
&lt;foff category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;forbiddenwords category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;&gt;       <br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;wordsRE&gt;Epoc|Nokia Mobile Phones|NMP|(^|\s)S60&lt;/wordsRE&gt;   <br />
&lt;/forbiddenwords&gt;<br />
&lt;forgottoputptroncleanupstack category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;friend category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
  <br />
&lt;goto category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
  <br />
&lt;ifassignments category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;ifpreprocessor category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;inheritanceorder category=&quot;canpanic&quot; enable=&quot;true&quot; severity=&quot;high&quot;/&gt;   <br />
&lt;intleaves category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
  <br />
&lt;jmp category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
  <br />
&lt;leave category=&quot;canpanic&quot; enable=&quot;true&quot; severity=&quot;high&quot;/&gt;   <br />
&lt;LeaveNoError category=&quot;functionality&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
&lt;leavingoperators category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;LFunctionCantLeave category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;&gt;       &lt;LFunctionIgnoreRE&gt;RunL&lt;/LFunctionIgnoreRE&gt;   &lt;/LFunctionCantLeave&gt;   <br />
&lt;longlines category=&quot;codingstandards&quot; enable=&quot;true&quot; length=&quot;160&quot; severity=&quot;low&quot;/&gt;   <br />
  <br />
&lt;magicnumbers category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;mclassdestructor category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;memberlc category=&quot;canpanic&quot; enable=&quot;true&quot; severity=&quot;high&quot;/&gt;   <br />
&lt;membervariablecallld category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;missingcancel category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;missingcclass category=&quot;canpanic&quot; enable=&quot;true&quot; severity=&quot;high&quot;&gt;       &nbsp;&nbsp;&nbsp;&nbsp;&lt;cclassIgnoreRE&gt;CBase&lt;/cclassIgnoreRE&gt;   <br />
&lt;/missingcclass&gt;   <br />
&lt;mmpsourcepath category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;multilangrsc category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;multipledeclarations category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;multipleinheritance category=&quot;functionality&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
&lt;mydocs category=&quot;functionality&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
  <br />
&lt;namespace category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;newlreferences category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;noleavetrap category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;nonconsthbufc category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;nonconsttdesc category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;nonleavenew category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;nonunicodeskins category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;null category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
  <br />
&lt;open category=&quot;canpanic&quot; enable=&quot;true&quot; severity=&quot;high&quot;&gt;       &nbsp;&nbsp;&nbsp;&nbsp;&lt;openIgnoreRE&gt;RDesReadStream|RDesWriteStream&lt;/openIgnoreRE&gt;<br />
&lt;/open&gt;   <br />
  <br />
&lt;pointertoarrays category=&quot;performance&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
&lt;pragmadisable category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;pragmamessage category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;pragmaother category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;privateinheritance category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;pushaddrvar category=&quot;canpanic&quot; enable=&quot;true&quot; severity=&quot;high&quot;/&gt;   <br />
&lt;pushmember category=&quot;canpanic&quot; enable=&quot;true&quot; severity=&quot;high&quot;/&gt;   <br />
  <br />
&lt;readresource category=&quot;canpanic&quot; enable=&quot;true&quot; severity=&quot;high&quot;/&gt;   <br />
&lt;resourcenotoncleanupstack category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;resourcesonheap category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   &lt;returndescriptoroutofscope category=&quot;canpanic&quot; enable=&quot;true&quot; severity=&quot;high&quot;/&gt;   <br />
&lt;rfs category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;rssnames category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
  <br />
&lt;stringliterals category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;stringsinresourcefiles category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;struct category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
  <br />
&lt;tcclasses category=&quot;functionality&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
&lt;tclassdestructor category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;todocomments category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;trapcleanup category=&quot;panic&quot; enable=&quot;true&quot; severity=&quot;high&quot;/&gt;   <br />
&lt;trapeleave category=&quot;performance&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
&lt;traprunl category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;trspassing category=&quot;functionality&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
  <br />
&lt;uids category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;uncompressedaif category=&quot;performance&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
&lt;uncompressedbmp category=&quot;performance&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
&lt;unicodesource category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;userafter category=&quot;performance&quot; enable=&quot;true&quot; severity=&quot;medium&quot;/&gt;   <br />
&lt;userfree category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;userWaitForRequest category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
  <br />
&lt;variablenames category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
&lt;voidparameter category=&quot;codingstandards&quot; enable=&quot;true&quot; severity=&quot;low&quot;/&gt;   <br />
  <br />
&lt;worryingcomments category=&quot;codereview&quot; enable=&quot;true&quot; severity=&quot;low&quot;&gt;       &nbsp;&nbsp;&nbsp;&nbsp;&lt;worryRE&gt;\!|\?|[Zz]{3}|kludge|workaround|\scrap|hack&lt;/worryRE&gt;   <br />
&lt;/worryingcomments&gt;<br />
  <br />
  <span class="listing">&lt;/scripts&gt; </span></p>
   <h4><a name="SEV_Element" id="ARG_Element4"></a>Severities Element</h4>
   <p>Each Severities element can contain one or more Severity elements, each of which corresponds to a severity level: </p>
   <ul>
     <li><b>Severity</b> element The name of each Severity element matches the name of the corresponding severity level. Each Severity element has the following attribute: 
       <ul>
         <li>enable (boolean) &ndash; Specifies whether scripts of a particular severity level are enabled by CodeScanner.</li>
       </ul>
     </li>
   </ul>
   <p> Complete list of currently supported Severity elements: </p>
   <p class="listing">&lt;severities&gt;<br />
    &nbsp;&nbsp;&nbsp;&nbsp;&lt;high enable=&rdquo;true&rdquo;/&gt;     <br />
      &nbsp;&nbsp;&nbsp;
   &lt;medium enable=&rdquo;true&rdquo;/&gt;     <br />
    &nbsp;&nbsp;&nbsp;&nbsp;&lt;low enable=&rdquo;false&rdquo;/&gt;<br />
   &lt;/severities&gt; </p>
   <h4><a name="CAT_Element" id="ARG_Element5"></a>Categories Element </h4>
   <p>Each Categories element can contain one or more Category elements, each of which corresponds to a category of CodeScanner scripts: </p>
   <ul>
     <li><b>Category</b> element The name of each Category element matches the name of the corresponding script category. Each Category element has the following attribute: 
       <ul>
         <li>enable (boolean) &ndash; Specifies whether scripts of a particular category are enabled by CodeScanner. </li>
       </ul>
     </li>
   </ul>
   <p>Complete list of currently supported Category elements: </p>
   <p class="listing">&lt;categories&gt;     <br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;legal enable=&quot;true&quot;/&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;panic enable=&rdquo;true&rdquo;&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;canpanic enable=&quot;true&quot;/&gt;     <br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;functionality enable=&rdquo;true&rdquo;/&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;localisation enable=&quot;true&quot;/&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;performance enable=&rdquo;true&rdquo;&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;codingstandards enable=&quot;true&quot;/&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;documentation enable=&rdquo;false&rdquo;/&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;codereview enable=&rdquo;false&rdquo;/&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;other enable=&quot;true&quot;/&gt; <br />
   &lt;/categories&gt;</p>
   <h4><a name="RULE_Element" id="ARG_Element6"></a>Customrules Element </h4>
   <p>Each custom rules element can contain one or more custom rule elements, each of which defines a custom rule to be applied by CodeScanner during scanning operation: </p>
   <ul>
     <li><b>Custom</b> rule element (<span class="code">&lt;customrule&gt;</span>, <span class="code">&lt;/customrule&gt;</span>) </li>
   </ul>
   <p>Each custom rule element contains the following elements: </p>
   <ul>
     <li><b>Name</b> element (<span class="code">&lt;name&gt;</span>, <span class="code">&lt;/name&gt;</span>) &ndash; The name element specifies the name used by CodeScanner internally to identify a custom rule. A custom rule element can only have one name element.</li>
     <li> <b>Keyword</b> element (<span class="code">&lt;keyword&gt;</span>, <span class="code">&lt;/keyword&gt;</span>) &ndash; A keyword element specifies a keyword to use when applying a custom rule. A custom rule element can have multiple keyword elements. <br />
       <br /> 
       A keyword element also has the following attribute: 
       <ul>
         <li>type(string) &ndash; specifies the type of a keyword. Here is a list of currently supported keyword types:
           <ul>
             <li>baseclass (name of the base class from the declaration of a sub-class) </li>
             <li>call (name of a called method) </li>
             <li>class (name used in the declaration/definition of a class) </li>
             <li>comment (keyword from a comment) </li>
             <li>generic (keyword used in generic search, i.e. look for anything that matches the keyword) </li>
             <li>local (name used in the definition of a local variable)</li>
             <li>macro (name used in the definition of a macro) </li>
             <li>member (name used in the definition of a data member)</li>
             <li> method (name used in the declaration/definition of a method) </li>
             <li>parameter (name of a resource statement parameter) </li>
           </ul>
         </li>
       </ul>
     </li>
     <li><b>File type</b> element (<span class="code">&lt;filetype&gt;</span>, <span class="code">&lt;/filetype&gt;</span>) &ndash; A file type element specifies a file extension type to  scan when applying a custom rule. A custom rule element can have multiple file type elements.  This element is required.</li>
     <li><b>Severity</b> element (<span class="code">&lt;severity&gt;</span>, <span class="code">&lt;/severity&gt;</span>) &ndash; A severity element specifies the severity level of a custom rule: high, medium or low. A custom rule element can have only one severity element.</li>
     <li><b>Title</b> element (<span class="code">&lt;title&gt;</span>,<span class="code"> &lt;/title&gt;</span>) &ndash; A title element specifies a title message associated with a custom rule. This is used as the title of HTML report or stdout warning/error message generated when applying a custom rule. A custom rule element can have only one title element.</li>
     <li><b>Description</b> element (<span class="code">&lt;description&gt;</span>, <span class="code">&lt;/description&gt;</span>) &ndash; A description element specifies a detailed description of a custom rule. This is used when generating HTML reports or warning/error messages for stdout when applying a custom rule. A custom rule element can have zero or one description element.</li>
     <li><b>Link</b> element (<span class="code">&lt;link&gt;</span>, <span class="code">&lt;/link&gt;</span>) &ndash; A link element specifies any external link associated with a custom rule. This is used when generating HTML reports or warning/error messages for stdout when applying a custom rule. A custom rule element can have zero or one link element. </li>
   </ul>
   <p>An example of CustomRules element: </p>
   <p class="listing">&lt;customrules&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;customrule&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name&gt;myOwnRule&lt;/name&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;keyword type=&rdquo;class&rdquo;&gt;CMyOwnClass&lt;/keyword&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;filetype&gt;h&lt;/filetype&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;severity&gt;low&lt;/severity&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;My own little CodeScanner rule&lt;/title&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;Locate the definition of CMyOwnClass::MyFunction()&lt;/description&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;link&gt;http://www.myownsite.nokia.com&lt;/link&gt;<br />
   &nbsp;&nbsp;&nbsp;&nbsp;&lt;/customrule&gt;<br />
   &lt;/customrules&gt;</p>
   <div id="footer">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br />License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div>
</body>
   </html>