bazel_clang_tidy icon indicating copy to clipboard operation
bazel_clang_tidy copied to clipboard

turn on flags

Open sualehasif opened this issue 3 years ago • 3 comments

Hi, how can you turn on --fix with clang-tidy

sualehasif avatar Jan 05 '22 02:01 sualehasif

You can't directly, because of parallel execution (clang-tidy would corrupt the files). You have to merge the fix files first, and apply them in one go, as described in the clang-tidy docs. Look for clang-apply-replacements

erenon avatar Jan 05 '22 07:01 erenon

Mmm, thanks for this. That works for me now. I still get a number of errors on *.h files and requires renaming them to *.hpp which is not in my style. I know you can use the flag -assume-filename=.hxx but not sure how to pass that to bazel-clang-tidy.

sualehasif avatar Jan 05 '22 16:01 sualehasif

Also, is it possibly to skip apply clang-tidy to some of the files in the build?

sualehasif avatar Jan 06 '22 21:01 sualehasif