Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clang-Tidy line-filter documentation question? #22

Closed
Levi-Armstrong opened this issue Dec 17, 2019 · 1 comment
Closed

Clang-Tidy line-filter documentation question? #22

Levi-Armstrong opened this issue Dec 17, 2019 · 1 comment

Comments

@Levi-Armstrong
Copy link

I am currently using the CXX_CLANG_TIDY functionality in CMake to add clang-tidy to targets. I have one file that is generated during the build that is out of my control that generates warnings for which I would like to suppress. I have tried the two line filters below but neither seem to change anything the header still produces warnings. Is my approach incorrect?

The file that contains the header that I would like to suppress:

#include <tesseract_monitoring/EnvironmentMonitorDynamicReconfigureConfig.h>

Line Filter Tried:

-header-filter=.* -line-filter=[{"name":"tesseract_monitoring/EnvironmentMonitorDynamicReconfigureConfig.h"}]

and

-header-filter=.* -line-filter=[{"name":"EnvironmentMonitorDynamicReconfigureConfig.h"}]
@Levi-Armstrong
Copy link
Author

I was able to get this to work. I misunderstood how this works. I assumed it filtered out code not to process but actually it is used to filter what to process. To get it to exclude a file using the line filter below.

"-line-filter=[{'name':'EnvironmentMonitorDynamicReconfigureConfig.h','lines':[[9999999,9999999]]}, {'name':'.h'}, {'name':'.hpp'}]"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant