0% found this document useful (0 votes)
4 views2 pages

CCT Tool User Guide for Code Checking

This user guide provides instructions on cloning the CCT tool, running it on a directory, and generating logs of committed changes. It also explains how to enable specific rules by editing a configuration file and addresses a limitation regarding Rule36 with a workaround. Users are advised to clear logs after checking them to ensure a fresh working state for the tool.

Uploaded by

rakshit maggon
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

CCT Tool User Guide for Code Checking

This user guide provides instructions on cloning the CCT tool, running it on a directory, and generating logs of committed changes. It also explains how to enable specific rules by editing a configuration file and addresses a limitation regarding Rule36 with a workaround. Users are advised to clear logs after checking them to ensure a fresh working state for the tool.

Uploaded by

rakshit maggon
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

User Guide

1. Clone the CCT :


git@[Link]:BBD-Software/cct_tool.git

2. To run tool on directory:


KINDLY, MAKE SURE TO COMMIT THE CHANGES (“git commit” or “hg commit”)
1. Goto /../cct_tool/code_checker_tool/
2. Run python [Link] /path to the directory/

3. Logs of committed changes (hg & git) will be displayed on the console.

3. You can also generate all the violations inside c files in any directory of your choice.
Run python [Link] /path to directory/
(File specific log and master log found inside /cct_tool/code_checker_tool/Logs/)

Note: You need to enable the tool for a fresh working after this.
Run python [Link]
after you are done checking your preferred logs.

4. You can enable CCT to run the rules of your choice.


Edit [Link] (Goto : /../cct_tool/code_checker_tool/[Link])
Kindly note, Workaround for Rule36 Limitation:

RULE36- Every code block should use brackets. Disallow to omit brackets.
Limitation: Tool logs error when conditional statements span to next line and for while in
do-while

Workaround: Adding explicit ‘\’ resolves the issue


Eg:
if ((strcmp(newObj->Option,"localfile") !=0) \
&& (strcmp(newObj->Option,"localfileandremote") != 0) \
&& (strcmp(newObj->Option,"localbuffer") != 0))
{
DEBUG("Unsupported Option paramter %s", newObj->Option);
return CFG_RET_INVALID_PARAM_VALUE;
}

You might also like