Auto formatting code using clang-format #306
cflaviu
started this conversation in
Ideas and RFCs
Replies: 2 comments 7 replies
-
We've spoken about this before, the concern brought up is that there's a possibility that it's too aggressive, leading to technically correct but practically unreadable formatting in some spaces, with no (clean) workaround. |
Beta Was this translation helpful? Give feedback.
5 replies
-
I created a .clang-format file matching as much as possible the current code although the coding style is not exactly the same in every source file. Please try and adapt if necessary this file https://gist.github.com/cflaviu/e95dd1272287b561c77b0b573092f425 . |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Applying a formatting rules file over all source contributions, it will reduce the time editing files and all the code will be standardized.
The rules could be set based on https://releases.llvm.org/11.0.0/tools/clang/docs/ClangFormatStyleOptions.html resulting a .clang-format file stored in .git folder of project. The all staged files could be formatted calling git clang-format command.
Beta Was this translation helpful? Give feedback.
All reactions