I'm trying to run clang-tidy
on a big project with a lot of files that include third party libraries:
#include "third_party/..."
And thus I receive a lot of errors corresponding to these third party libraries.
Adding NOLINT
to each include is not an option since the project is large (and it seems that it doesn't work).
I tried to use -header-filter
, but I still receive errors from third party libraries.
clang-tidy -header-filter='-third_party' "${SOURCE_FILES[@]}"
Is it possible to exclude third_party/*
from checks?
You should flag these headers as system headers.
You can do this via
#pragma clang system_header
These headers will get ignored by clang-tidy and will produce no warnings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With