bazel/clang_tidy/plugins/README.md
This directory contains sources and bazel targets for custom out-of-tree clang-tidy checks.
It contains a single redpanda_cc_binary target, plugins.so, which contains a single clang-tidy
module, redpanda-module.
$ bazel build //bazel/clang_tidy/plugins:plugins.so
plugins/redpanda_noop_check.h.plugins.so.srcs including any new dependencies.plugins/redpanda_tidy_module.h.
Checks introduced in this way are automatically loaded in bazel build --config=clang-tidy //....
If you want to try your check on some source file in isolation, you can invoke the tool directly:
$ bazel build //bazel/clang_tidy/plugins:plugins.so
$ ./tools/clang-tidy --checks=-*,redpanda-my-fancy-check -list-checks
$ ./tools/clang-tidy --checks=-*,redpanda-my-fancy-check /path/to/some/foo.cc