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

added pre commit hook #450

Merged

Conversation

DiamonDinoia
Copy link
Collaborator

I have added a pre-commit-hook to format the code automatically at every commit. It uses the .clang-format provided by @blackwer in the git root.

@ahbarnett
Copy link
Collaborator

To check, this won't destroy all the git blame info for the source code, right? I don't use auto format - will it mess up my commenting in the source?

@blackwer
Copy link
Member

blackwer commented Jun 4, 2024

To check, this won't destroy all the git blame info for the source code, right? I don't use auto format - will it mess up my commenting in the source?

There's a lot of discussion about this in the slack, but as is, this won't do anything to the existing code. It should only reformat changes automatically. Was hoping we could continue the discussion from the slack in today's meeting to talk about doing a reformat commit, though -- it's trivial to make git ignore the reformat commit for blames.

@ahbarnett ahbarnett merged commit 70fb0f5 into flatironinstitute:master Jun 4, 2024
9 checks passed
@DiamonDinoia DiamonDinoia deleted the add-pre-commit-hook branch July 3, 2024 19:47
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.

3 participants