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;
}