Closed JPenuchot closed 2 years ago
Hi Jules,
Thanks for the message. I have delayed my adoption of clang-format for too long. Are there any particular clang-format settings that you would recommend?
Regards, Paul
Hi Paul,
Are there any particular clang-format settings that you would recommend?
I played around with different styles, but now I just use the LLVM style which is the default one. Indentation preference is really subjective, so I'd rather go for the easiest choice. It limits rows to 80 characters which is spot on for dual pane editing on a laptop.
The reason why I prefer using clang-tidy is not for the aesthetics of a specific style but mostly to have an indentation oracle that allows me to carry on with more important things. It's also a pretty nice tool to avoid things like noisy diffs due to accidental indentation/spacing changes.
Regards, Jules
------- Original Message -------
On Thursday, February 24th, 2022 at 12:21 AM, pkeir @.***> wrote:
Hi Jules,
Thanks for the message. I have delayed my adoption of clang-format for too long. Are there any particular clang-format settings that you would recommend?
Regards,
Paul
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: @.***>
Same sentiment, the only thing I suggest is 80 columns, space instead of tabs
80 columns and spaces certainly. I'm glad we're all together on that.
Would you recommend using a .clang-format
file in the repo? Also a pre-commit hook?
in the repo. pre-commit hook applying formatting is sometimes dangerous
Hello Paul,
I would like to discuss formatting rules to make sure there is no ambiguity for future contributions. I use to clang-format everything and call it a day as it is clean, consistent, and easy to follow. I just wanted to know how you approach that matter to make sure I don't step on your boundaries.
Regards, Jules