[suggestion] Add .clang-format to help fit the existing coding style#835
Closed
Arpafaucon wants to merge 2 commits intowolfpld:masterfrom
Closed
[suggestion] Add .clang-format to help fit the existing coding style#835Arpafaucon wants to merge 2 commits intowolfpld:masterfrom
Arpafaucon wants to merge 2 commits intowolfpld:masterfrom
Conversation
Owner
|
How does this work in practice, when you are editing files? Proper code formatting is always a problem and it's good to automate this, but I don't want to be fighting with a system that is "fixing" deliberate side-steps from the established convention, like in the examples you show. |
Contributor
Author
|
I use VSCode; I don't know how much this applies to other users. Personnally (and in my company), I hate the "format on save" option of VSCode, because it's acting behind your back.
|
Owner
|
I have cherry-picked the commit. Formatting is done only on demand, so it's fine. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While working on #825 I found useful to spin up this config file to be able to fit the existing coding style.
It's not perfect, but I already goes a long way; maybe you'd be interested ?
Known caveats:
I committed 2 files so you can quickly look at the diff and get a sense of how files are affected