-
Notifications
You must be signed in to change notification settings - Fork 35
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
Run clang-tidy in CI or as an extended check #537
Comments
FWIW this issue just popped up in cudf as well. In my case, the tracebacks all point back to
I'm also having difficulty suppressing them in our runs. The recent release of clang-tidy 19 exposed the ability to exclude headers, which helps, but I'm running into cases specifically with nanoarrow where the exclusions don't work. I suspect that the issue comes from the extensive use of macros and clang-tidy having special logic around the way macros are handled in the call stack, but I'm not sure about that. |
I'll take another look today! |
Meson has built-in support for clang-tidy, so if we wanted to I think can just add a .clang-tidy configuration to the project root and run |
I'll plug through fixing all of these tomorrow, but I'll also share here the workaround from ADBC which may be helpful here which involves some magic with |
Ah yeah I'm doing something similar to prevent clang-tidy from checking nanoarrow sources, but I still see some errors in nanoarrow headers because clang-tidy will check all headers included in source files that are checked. In theory those should be possible to filter, and I've been able to filter all other vendored/downloaded at build-time headers, but not nanoarrow's. I suspect the issue is specifically with how macros are being handled in nested contexts and that defeating the filtering capabilities of clang-tidy. |
Is the current implementation expected to be exhaustive? I still see a lot of errors when running locally - not sure if that is expected or not:
|
Wow this is amazing timing... #639 (comment) |
It looks like you're running it directly on a single header? That header is not quite self-contained, which does need to be fixed, but we use
I'll take a look! |
Ah OK. Will take a look - some source files have issues too:
|
Do you have |
Hmm well I got this from running the ninja target that Meson creates, which I think gets all of the necessary flags from the compilation database. Will have to take a closer look though |
Then perhaps you didn't build in debug mode? I only ask because that exact error disappeared in CI when I added |
I get the same warning in both debug / release builds, but haven't looked too much closer than that |
I'm not an expert here but it's very possible I missed something! If adding a |
The
clang-tidy
job in ADBC higlighted a few warnings that should be addressed ( apache/arrow-adbc#1928 ). We should run this in our CI to ensure that nanoarrow doesn't cause problems for downstream projects that use clang-tidy (like ADBC!).https://github.com/apache/arrow-adbc/actions/runs/9590445640/job/26445818971?pr=1928#step:7:344
The text was updated successfully, but these errors were encountered: