Bazel rules for CodeChecker and other tools for Code Analysis,
like Clang-tidy, Clang analyzer, and compilation database (compile_commands.json) generation.
Tip
You may try this on zlib:
git clone https://github.com/madler/zlib.git
cd zlib
- Bazel 7 or 8 (not 9 yet)
- CodeChecker 6.27.3
- Clang and clang-tidy 21
- Python 3.11 or newer
Check that you have all tools and versions:
bazel version
CodeChecker version
python3 --version
clang --version
clang-tidy --version
clang-extdef-mapping --version
which diagtoolbazel_dep(name = "rules_codechecker")
git_override(
module_name = "rules_codechecker",
remote = "https://github.com/Ericsson/rules_codechecker.git",
commit = "cb57742eeaec172de042258a6053d87aee51e808",
)load("@rules_codechecker//:defs.bzl", "codechecker_test")
codechecker_test(
name = "codechecker",
targets = [":z"],
)bazel test //:codechecker --test_output=allFull documentation: docs/
See CONTRIBUTING.md