Skip to content

Apply clang-format update to repo #1154

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

Merged
merged 5 commits into from
Apr 25, 2024
Merged

Apply clang-format update to repo #1154

merged 5 commits into from
Apr 25, 2024

Conversation

mrdomino
Copy link
Collaborator

Commit bc6c183 introduced a bunch of discrepancies between what files
look like in the repo and what clang-format says they should look like.
However, there were already a few discrepancies prior to that. Most of
these discrepancies seemed to be unintentional, but a few of them were
load-bearing (e.g., a #include that violated header ordering needing
something to have been #defined by a 'later' #include.)

I opted to take what I hope is a relatively smooth-brained approach: I
reverted the .clang-format change, ran clang-format on the whole repo,
reapplied the .clang-format change, reran clang-format again, and then
reverted the commit that contained the first run. Thus the full effect
of this PR should only be to apply the changed formatting rules to the
repo, and from skimming the results, this seems to be the case.

My work can be checked by applying the short, manual commits, and then
rerunning the command listed in the autogenerated commits (those whose
messages I have prefixed auto:) and seeing if your results agree.

It might be that the other diffs should be fixed at some point but I'm
leaving that aside for now.

@mrdomino mrdomino requested a review from jart April 23, 2024 17:21
@mrdomino mrdomino force-pushed the clang-format branch 2 times, most recently from 7d80fdf to d9e4b43 Compare April 23, 2024 17:27
Specifically, does this:

    fd '\.c(c|pp)?$' --print0| xargs -0 clang-format -i
Same as before:

    fd '\.c(c|pp)?$' --print0| xargs -0 clang-format -i

This time, should only pick up the changes introduced by the
.clang-format update.
Copy link
Owner

@jart jart left a comment

Choose a reason for hiding this comment

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

My name is Justine Tunney and I approve this high impact change.

@jart jart merged commit 6e6fc38 into jart:master Apr 25, 2024
@mrdomino mrdomino deleted the clang-format branch April 25, 2024 17:38
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