mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
Add Cppcheck analysis to the xen-analysis.py script using the arguments --run-cppcheck. Now cppcheck analysis will build Xen while the analysis is performed on the source files, it will produce a text report and an additional html output when the script is called with --cppcheck-html. With this patch cppcheck will benefit of platform configuration files that will help it to understand the target of the compilation and improve the analysis. These are XML files placed in xen/tools/cppcheck-plat/, describing to cppcheck the length of basic types to help it in the analysis. To do so: - Update xen-analysis.py with the code to integrate cppcheck. - add platform configuration files for cppcheck.. - add cppcheck-cc.sh script that is a wrapper for cppcheck and it's used as Xen compiler, it will intercept all flags given from the make build system and it will execute cppcheck on the compiled file together with the file compilation. - guarded hypercall-defs.c with CPPCHECK define because cppcheck gets confused as the file does not contain c code. - add false-positive-cppcheck.json file - update documentation. - update .gitignore Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Tested-by: Stefano Stabellini <sstabellini@kernel.org>
13 lines
257 B
JSON
13 lines
257 B
JSON
{
|
|
"version": "1.0",
|
|
"content": [
|
|
{
|
|
"id": "SAF-0-false-positive-cppcheck",
|
|
"violation-id": "",
|
|
"tool-version": "",
|
|
"name": "Sentinel",
|
|
"text": "Next ID to be used"
|
|
}
|
|
]
|
|
}
|