Creating a Compliance Report
As of Klocwork 2020.4, you can create compliance reports in Klocwork Static Code Analysis which can help you determine the health of your code base when following industry standards such as MISRA. This report generates a document which identifies whether your current code base passes each specific compliance rule that is relevant to you. To get started, open the compliance report tool:
- From the Reports tab in Static Code Analysis, click Compliance Report at the bottom of the menu; the Compliance Report UI appears.
- You can access previously generated reports in the left panel; the right panel provides the controls you can use to generate reports.
- First, select the taxonomy you want to run the report against. (For example, C and C++)
- Under Build, select which build you want to use in the report.
- Under Views, select the view used in the report. If this field is blank, the report uses the default view.
- Under Report Format, you can select the MISRA option to generate a report in the MISRA 2020 guidelines format. By default, the report uses the Klocwork generic compliance format.
- Next, under Output File Type, select the output type for the report. The default is PDF.
- Under Output File Name, select the name of the report. By default, the file name is '<project_name> <specified build>'
- Under Output Folder Name, select where to save the report. The default is the root folder of the compliance reports in the left sidebar.
- Select Summary Only to only show the summary of rule violations in the report. By default both summary and detailed violation/deviation tables are included in the report. Note: In order to see the full, non-summary version of the report, you must have a Compliance License. For more information, contact Klocwork Customer Support.
- Lastly, select the Defects Limit (the number of issues included in the report) for the generated report. Note that increasing this number slows down generation time and increases the report size. Adding a defect limit only impacts the full, non-summary report as it applies a limit to the number of issues in the violation and deviation details tables. This step is optional. You may want to use this option when generating a non-summary report with a large number of deviations.
- Click Generate to build the report.
You can find the generated report in the reports panel on the left.
Note: If you want to delete a previously generated report, you need to remove it from the 'projects_root/projects/custom_reports' folder.