libuv icon indicating copy to clipboard operation
libuv copied to clipboard

misc: add clang-format config file

Open vtjnash opened this issue 4 months ago • 2 comments

This is intended to reduce reviewer effort going forward by automating a lot of the most common review comments. I've asked Claude to suggest a .clang-format file that most aligns with the format it saw in the existing files, then made a few tweaks myself. Only the first and second commit here should be merged directly from here. The third commit is the result of running clang-format on all files (which should be done separately and pushed along with the fourth commit to ignore that resulting commit hash in git blame)

vtjnash avatar Aug 26 '25 13:08 vtjnash

Thanks gor getting this started!

I see a lot of noise from the docs/ directory. It contains a bunch of examples, how about we skip it altogether for clang-format?

saghul avatar Aug 26 '25 13:08 saghul

We can now just reformat those files too. The intent will be to land the first commit (just the rule database) then I can land all of the reformatting changes (including adding docs to those), then land the checker file with the added option of only checking changed lines (this PR was too big to enable that option). While this PR may break most WIP, I hope it should be able to "heal" by running git clang-format upstream/v1.x && git merge upstream/v1.x && git reset --soft upstream/v1.x && git commit -C <old-commitish> && git push --force-with-lease

vtjnash avatar Aug 26 '25 14:08 vtjnash