erenon / bazel_clang_tidy

Run clang-tidy on Bazel C++ targets directly, efficiently, with caching enabled
MIT License
103 stars 54 forks source link

Documentation for cxxopt #59

Open LukeCz opened 7 months ago

LukeCz commented 7 months ago

Added documentation and example for passing --cxxopt.

erenon commented 7 months ago

Hi, thanks for the contribution. It appears a different heading got pasted into the description body. Also, I do not understand the reference to --, it doesn't appear in the code example.

LukeCz commented 7 months ago

Hi, there reference to '--' is this: https://github.com/erenon/bazel_clang_tidy/blob/4884c32e09c1ea9ac96b3f08c3004f3ac4c3fe39/clang_tidy/clang_tidy.bzl#L46. It is used to separate clang-tidy flags from clang flags (https://clang.llvm.org/extra/clang-tidy/#using-clang-tidy). It took me a while reading Bazel (I'm not a Bazel expert) code to figure out how to pass compiler flag from bazelrc and this is why I added it to the guide.