clang-tidy : How to exclude third party conan packages data folder from clang-tidy analysis

30 Views Asked by At

I'm trying to configure clang-tidy in my project folder. It's with great challenge, but so far I've achieved most of the project requirements for clang-tidy except one. clang-tidy is analysing and throwing errors from 3rd party packages in my .conan folder. I tried all combinations of HeaderFilterRegex and --header-filter possible. Some example experiments are:

  • HeaderFilterRegex: '^src/app/*|^(?!/root/.conan/data/).*$'
  • HeaderFilterRegex: '^((?!/root/.conan/data/|/builds/).)*$'

As suggested in mentioned duplicate stackoverflow question, I tried without negation in regex. I am getting the similar errors from clang-tidy analysis out of 3rd party conan packages.

  • HeaderFilterRegex: 'my_project\/src\/app\/*.h'
  • HeaderFilterRegex: 'src\/app\'

Could anyone help me sort out this issue? I was able to filter other external libraries in other ways, but not yet filter and exclude .conan packages.

0

There are 0 best solutions below