-
Notifications
You must be signed in to change notification settings - Fork 164
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
Unified formatting through clang-format #518
Comments
First, I'm a huge supporter of incorporating clang-format. I'm happy to be not a lonely one :) Have you seen these? |
Perhaps I could submit a PR then to update the file, and the people who want it will just I believe that would be a reasonable tradeoff. @lpranam @codejaeger @stefanseefeld what do you think? Perhaps we could try testing it on latest PRs and put it at the root of the project? |
I personally give
As long as the coding style makes code readable, compact, horizontally limited, I'm fine with it. The lack of consistency in GIL, especially in parts of IO, have been annoying, but manual improvements and maintenance cost lots of time. Hence, I'm eager to require use of clang-format, even if I need to trade personal preferences :-) |
I agree with this. At least we can have consistent styling in new code. |
I'd add to the overall discussion this RFC of mine https://trac.osgeo.org/geos/wiki/RFC4 where some details and implications are discussed, including external references, especially three parts of MongoDB story how they managed the "big reformat": |
We should give this a try :-) https://www.youtube.com/watch?v=_EaU3VsDOJM
|
I am also all in for clang-format. To avoid introducing a |
Once we agree on the definition of .clang-format, I don't mind either exploring the history rewrite option or just swallowing the "big reformat" pill. |
In past, I have used |
Quoting the
Is there any Boost wide |
No, or I don't know about any, but some individual libraries have some (including us):
|
Is your feature request related to a problem? Please describe.
During PRs developers spend time on making formatting consistent across the project. That takes time and a thing that could be totally automated.
Describe the solution you'd like
Add a
.clang-format
file that would dictate how files are formatted, and possibly create a hook so that it gets reformatted automaticallyDescribe alternatives you've considered
I haven't found any formatting engine that would be as good as clang-format. Other IDEs either have their proprietary version or have moved to clang-format
Proposed .clang-format
I have tried this out, and it works for our codebase. The only problem being
BeforeLambdaBody
is introduced in clang-format 12 I believe, which is yet to be released.The text was updated successfully, but these errors were encountered: