You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 422f17c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: man/manual.md
+49-26Lines changed: 49 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1341,7 +1341,18 @@ The `.cfg` file format is documented in the `Reference: Cppcheck .cfg format` (<
1341
1341
1342
1342
# HTML report
1343
1343
1344
-
You can convert the XML output from Cppcheck into a HTML report. You'll need Python and the pygments module (<http://pygments.org/>) for this to work. In the Cppcheck source tree there is a folder reports/htmlreport that contains a script that transforms a Cppcheck XML file into HTML output.
1344
+
## Overview
1345
+
1346
+
Using AI, you can easily and quickly create a script that converts the Cppcheck XML output into a nice-looking HTML report with any features you want.
The script `cppcheck-htmlreport` converts a Cppcheck XML file into a HTML output. You'll need Python and the pygments module (<http://pygments.org/>) for this to work.
## Choosing between local annotated HTML and remote repository links
1388
+
###Choosing between local annotated HTML and remote repository links
1378
1389
1379
1390
`cppcheck-htmlreport` supports two modes for linking to source files:
1380
1391
@@ -1394,26 +1405,26 @@ handled by the hosting service.
1394
1405
In general, local mode fits air-gapped environments, while remote mode works
1395
1406
best for CI workflows and large or private repositories.
1396
1407
1397
-
#Cppcheck Explorer report
1408
+
##Explorer report
1398
1409
1399
-
The script `reports/explorer/report.py`in the Cppcheck source tree converts Cppcheck XML output into a Cppcheck Explorer report, which you view in a browser. The report has a dashboard with graphs, and a results view where you can filter the warnings and see the related source code. It is designed to be responsive also when there are thousands of warnings.
1410
+
The script `reports/explorer/report.py`creates a Cppcheck Explorer report. The report has a dashboard with graphs, and a results view where you can filter the warnings and see the related source code. If the XML file contains metrics, these are shown as well. The report is designed to be responsive also when there are thousands of warnings.
1400
1411
1401
1412
You only need Python to run the script, no extra modules are required.
1402
1413
1403
-
## Generating a report
1414
+
###Generating a report
1404
1415
1405
-
First analyze the code and save the results in a XML file, then generate the report:
1416
+
First analyze the code and save the results in an XML file, then generate the report:
Open `cppcheck-report/index.html` in a browser. No web server is needed. To share the report, copy the whole `cppcheck-report` folder. Note that the report contains the source code.
1421
+
Open `cppcheck-report/index.html` in a browser. To share the report, copy the whole `cppcheck-report` folder. Note that the report contains the source code.
1411
1422
1412
1423
The source files are searched for in the current folder and in the folder of the XML file. Use `--source-dir` if they are located somewhere else:
0 commit comments