wakaama/doc/code_checker.rst
Lukas Woodtli 10e8365728 ci: Use CodeChecker as static analysis tool
CodeChecker combines multiple static code analysis tools including
`clang-sa`. It also provides the possibility to check against a baseline
to report only newly introduced issues.
Moreover it is simpler to use.
It could eventually replace `clang-sa` completely in the pipeline.
2024-12-10 15:12:41 +01:00

40 lines
903 B
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Static Code analysis with CodeChecker
=====================================
Wakaama uses ```CodeChecker`` <https://codechecker.readthedocs.io/>`__
for static code analysis.
Its possible to run ``CodeChecker`` in two different modes: ``full``
and ``diff``
In ``full`` mode all found issues are reported. In ``diff`` mode only
new issues are shown.
The ``diff`` mode compares found issues with a base line and shows
only newly found issues.
Running ``CodeChecker``
-----------------------
The ``CodeChecker`` is run as part of the CI GitHub Actions. But it can
be run manually:
To show new issues:
::
tools/ci/run_ci.sh --run-build --run-code-checker --code-checker diff
To show *all* issues:
::
tools/ci/run_ci.sh --run-build --run-code-checker --code-checker full
Create new base line:
::
tools/ci/run_ci.sh --run-build --run-code-checker --code-checker baseline