Skip to content

Conversation

@timwoj
Copy link
Member

@timwoj timwoj commented Jun 10, 2025

After the last round of clang-tidy fixes, I discovered that it was never configured to cover header files and was only scanning cc files and what little bit of headers that it saw during builds. This PR expands coverage to all of the headers in the Zeek repo, including generated code. It explicitly excludes files from src/3rdparty and broker, and anything that comes from a directory external to the repo itself. It looks like a lot of commits, but most of them are very small. The really huge ones are performance-enum-size and cppcoreguidelines-macro-usage.

This relies on these PRs in other repos: zeek/bifcl#40, zeek/binpac#45, zeek/cmake#137, zeek/gen-zam#17

Sorry this one turned into such a codefist 👊🏼

@timwoj timwoj added the CI: Full Run the full set of tasks in CI label Jun 10, 2025
@timwoj
Copy link
Member Author

timwoj commented Jun 11, 2025

Dang, I didn't realize that cmake_path wasn't added until CMake 3.20. I'll have to find another way to do that.

Copy link
Contributor

@awelzel awelzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uff, thanks for doing this all. Had some thoughts and opinions here and there, but feel free to push back. The "random thoughts" are also just things that came in mind looking at the code, so do whatever you like with those :-)

@timwoj
Copy link
Member Author

timwoj commented Jun 12, 2025

zeek/cmake#137 still needs a review as part of this.

timwoj added 15 commits June 23, 2025 08:35
This one is weird. This checker complains because we tend to use PList,
which sets the type of T to a pointer. The checker is making note that
we're doing sizeof() on a pointer, which always returns the same value
every time. It's asking whether we meant to do that, or if we meant to
pass the actual type to sizeof.
timwoj added 26 commits June 23, 2025 08:35
@timwoj timwoj force-pushed the topic/timw/clang-tidy-fixes branch from 5a1eb21 to 6aa5145 Compare June 23, 2025 15:42
@timwoj timwoj merged commit 8d92ad4 into master Jun 23, 2025
33 of 34 checks passed
@timwoj timwoj deleted the topic/timw/clang-tidy-fixes branch June 23, 2025 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: Full Run the full set of tasks in CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants