-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Updating and slightly enhancing instructions for running clang-tidy. #3055
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
Conversation
apt-get update && apt-get install python3-dev python3-pytest | ||
cmake -S pybind11/ -B build -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);-fix" | ||
cmake --build build | ||
docker run --rm -v $PWD:/mounted_pybind11 -it silkeh/clang:12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works although docker is a little overkill for clang-tidy IMO. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting a consistent LLVM install on all platforms is not exactly easy. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a centrally managed "workstation" (in the cloud). Stuff I install manually disappears seemingly randomly. The behavior of a docker container is a bit more predictable.
…ment in workflow file pointing to documentation.
I forgot to mention, the |
Thanks Aaron and Henry! |
@rwgk FYI: You can autofix many clang-tidy issues with the following script: https://clang.llvm.org/extra/doxygen/run-clang-tidy_8py_source.html |
Follow-on to PR #3051 which updated the docker container version in .github/workflows/format.yml but not in the docs.
Minor clarification from where to run the docker command (for docker muggles like myself).
Adding
--yes
for convenience and--keep-going
for engineering productivity.Tested interactively.