mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
We don't enforce cppcheck through the CI, although it's there since years. It runs on Ubuntu 18/20, so it's old. For folks, it's likely not discoverable on how to run it locally. Let's make a fresh start. This removes cppcheck from all CI-related code. Instead, it adds it under tools/cppcheck/, including documentation on how to run it locally, bare-matel or in docker. Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
29 lines
816 B
Markdown
29 lines
816 B
Markdown
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
|
|
|
|
# Static code analysis
|
|
|
|
How to run static code analysis tool(s).
|
|
|
|
[[_TOC_]]
|
|
|
|
## cppcheck Overview
|
|
|
|
This can run a (dockerized) cppcheck static code analysis. The docker-compose
|
|
file represents the status as run as in the CI until it's removal (because it
|
|
was not enforced). It is now here so that people could use it to find bugs (and
|
|
use the tool more easily).
|
|
|
|
## cppcheck Usage
|
|
|
|
From the openairinterface5g root, simply run
|
|
|
|
./tools/cppcheck/run-cppcheck.sh
|
|
|
|
This will run cppcheck with options listed in this file, assuming you have it
|
|
installed. Alternatively, you can run the CI version as of Ubuntu 20 with
|
|
|
|
cd tools/cppcheck && docker compose up --no-log-prefix
|
|
|
|
You can upgrade to a newer version by modifying the `FROM` line in the
|
|
docker-compose file.
|