Skip to content

Clang tidy include cleaner #13280

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

fzakaria
Copy link
Contributor

No description provided.

# TODO: change this to use run-clang-tidy.py
entry = "${pkgs.writeShellScript "clang-tidy-wrapper" ''
for file in "$@"; do
"${pkgs.clang-tools}/bin/clang-tidy" --fix -p ./build "$file"
Copy link
Contributor

Choose a reason for hiding this comment

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

meson has clang-tidy and clang-tidy-fix targets. Can't we reuse that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea likely will do that but that runs on all targets.
I'm exploring how to add it as a pre-commit as well.
(We might abandon this change for now as we go about fixing warnings)

Copy link
Contributor

Choose a reason for hiding this comment

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

It's worth noting that I did go over the codebase a bit with clang-tidy as a part of #11839. Thanks for picking up that activity!

Though we'd need to settle on a good clang-tidy config first. A lot of the checks are rather opinionated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was trying to emit profile information to see which checks are really slow, so we can get something fast and iterate but I was hitting: llvm/llvm-project#141639

(Not sure if you faced this)

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

Successfully merging this pull request may close these issues.

2 participants