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

MNT: add pre-commit hooks for clang-format and other checks #55

Open
wants to merge 2 commits into
base: pre-release
Choose a base branch
from

Conversation

JJL772
Copy link
Member

@JJL772 JJL772 commented Aug 15, 2023

Pretty straightforward PR, add some pre-commit hooks to avoid annoying STY: clang-format commits.

@JJL772 JJL772 force-pushed the enh_pre_commit branch 2 times, most recently from 8e804c0 to e1819f7 Compare August 16, 2023 21:40
@JJL772
Copy link
Member Author

JJL772 commented Aug 16, 2023

This is turning out to be more annoying than I expected

@klauer
Copy link
Collaborator

klauer commented Aug 17, 2023

Formatting difference between clang-format v15 (apt) vs v16 on pre-commit, it seems?

What we do for formatting is use pre-commit on CI to ensure we're running the same thing in both places:
https://github.com/pcdshub/pcds-ci-helpers/blob/master/.github/workflows/pre-commit.yml

@JJL772
Copy link
Member Author

JJL772 commented Aug 17, 2023

Even locally, pre-commit formatted things differently than clang-format-16 for some reason. The version should've been identical between pre-commit's container and my system. I think you're right, running pre-commit in CI for this might help

@JJL772 JJL772 changed the base branch from master to pre-release April 11, 2024 22:59
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

Successfully merging this pull request may close these issues.

2 participants