clang-format and Allman style

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

clang-format and Allman style

Arji Cot
I noticed that all the 4 style available by default ( LLVM, Google, Chromium, Mozilla ) are basically the same with little to no variation, the first thing that I noticed is the lack of the Allman style, which is quite popular style for formatting C and C++ code, but is also one of the most readable style: the lack of the Allman style is something done on purpose ( for some reason ) or it's just not available yet ?

I'm asking this question simply because Allman is really popular and I found strange that not even after tweaking ( http://clang.llvm.org/doxygen/structclang_1_1format_1_1FormatStyle.html ) clang-format a little I got a real Allman style or something that I'm just happy with, looks like that clang-format is designed to keep a certain style in any case.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang-format and Allman style

Sebastian Redl

On 20.07.2013, at 09:46, Arji Cot wrote:

I noticed that all the 4 style available by default ( LLVM, Google, Chromium, Mozilla ) are basically the same with little to no variation, the first thing that I noticed is the lack of the Allman style, which is quite popular style for formatting C and C++ code, but is also one of the most readable style: the lack of the Allman style is something done on purpose ( for some reason ) or it's just not available yet ?

I'm asking this question simply because Allman is really popular and I found strange that not even after tweaking ( http://clang.llvm.org/doxygen/structclang_1_1format_1_1FormatStyle.html ) clang-format a little I got a real Allman style or something that I'm just happy with, looks like that clang-format is designed to keep a certain style in any case.

Clang-format's style support is developed on an as-needed basis. Obviously the first style supported was LLVM style. The other styles are supported because developers who use those styles (read: general Google devs,  Chromium devs, and Mozilla devs) wanted to use clang-format and put in the options to use the style.

None of these styles use Allman indentation, which is the only reason it's not supported.

Sebastian


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang-format and Allman style

Manuel Klimek
On Sun, Jul 21, 2013 at 2:49 PM, Sebastian Redl <[hidden email]> wrote:

On 20.07.2013, at 09:46, Arji Cot wrote:

I noticed that all the 4 style available by default ( LLVM, Google, Chromium, Mozilla ) are basically the same with little to no variation, the first thing that I noticed is the lack of the Allman style, which is quite popular style for formatting C and C++ code, but is also one of the most readable style: the lack of the Allman style is something done on purpose ( for some reason ) or it's just not available yet ?

I'm asking this question simply because Allman is really popular and I found strange that not even after tweaking ( http://clang.llvm.org/doxygen/structclang_1_1format_1_1FormatStyle.html ) clang-format a little I got a real Allman style or something that I'm just happy with, looks like that clang-format is designed to keep a certain style in any case.

Clang-format's style support is developed on an as-needed basis. Obviously the first style supported was LLVM style. The other styles are supported because developers who use those styles (read: general Google devs,  Chromium devs, and Mozilla devs) wanted to use clang-format and put in the options to use the style.

None of these styles use Allman indentation, which is the only reason it's not supported.

I'd add: patches welcome :)

Cheers,
/Manuel
 

Sebastian


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev