You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be helpful to use a fixed coding style to avoid various merge conflict due to different editor settings? If yes, we should pick a style which can be enforced by a tool, e.g. astyle can convert the file into various styles. Tool clang-formatter turns code into google style. Once we are settled on one format, I can run the tool on all files and send a PR with consistent formatting.
Tool astyle support following styles. I prefer -A1 (the first one) but I am OK with any of the following.
--style=allman OR --style=bsd OR --style=break OR -A1
Allman style formatting/indenting.
Broken braces.
--style=java OR --style=attach OR -A2
Java style formatting/indenting.
Attached braces.
--style=kr OR --style=k&r OR --style=k/r OR -A3
Kernighan & Ritchie style formatting/indenting.
Linux braces.
--style=stroustrup OR -A4
Stroustrup style formatting/indenting.
Linux braces.
--style=whitesmith OR -A5
Whitesmith style formatting/indenting.
Broken, indented braces.
Indented class blocks and switch blocks.
--style=vtk OR -A15
VTK style formatting/indenting.
Broken, indented braces except for the opening braces.
--style=ratliff OR --style=banner OR -A6
Ratliff style formatting/indenting.
Attached, indented braces.
--style=gnu OR -A7
GNU style formatting/indenting.
Broken braces, indented blocks.
--style=linux OR --style=knf OR -A8
Linux style formatting/indenting.
Linux braces, minimum conditional indent is one-half indent.
--style=horstmann OR --style=run-in OR -A9
Horstmann style formatting/indenting.
Run-in braces, indented switches.
--style=1tbs OR --style=otbs OR -A10
One True Brace Style formatting/indenting.
Linux braces, add braces to all conditionals.
--style=google OR -A14
Google style formatting/indenting.
Attached braces, indented class modifiers.
--style=mozilla OR -A16
Mozilla style formatting/indenting.
Linux braces, with broken braces for structs and enums,
and attached braces for namespaces.
--style=pico OR -A11
Pico style formatting/indenting.
Run-in opening braces and attached closing braces.
Uses keep one line blocks and keep one line statements.
--style=lisp OR -A12
Lisp style formatting/indenting.
Attached opening braces and attached closing braces.
Uses keep one line statements.
The text was updated successfully, but these errors were encountered:
Would it be helpful to use a fixed coding style to avoid various merge conflict due to different editor settings? If yes, we should pick a style which can be enforced by a tool, e.g.
astyle
can convert the file into various styles. Toolclang-formatter
turns code into google style. Once we are settled on one format, I can run the tool on all files and send a PR with consistent formatting.Tool
astyle
support following styles. I prefer-A1
(the first one) but I am OK with any of the following.The text was updated successfully, but these errors were encountered: