[neomutt-devel] mutt's coding style

toogley at mailbox.org toogley at mailbox.org
Wed Nov 2 20:40:50 CET 2016


Hey Kevin :)

I'm just curious, but what do you think about mutt's coding style? I don't mean the theory like its written on https://dev.mutt.org/trac/wiki/CodingStyle, rather the practical implementation.

If i clone the official mutt source code and run "indent -nce -bls --braces-after-if-line --brace-indent0 --case-indentation2 --indent-level2  *.c" on it, I see about 81123 lines changing in 114 different files. So i don't think we can say that the mutt coding style is very strictly followed. :D

What do you think is the reason for that? Are there any things which block following the coding style in a strict way?

---

Additionally, regarding the theory: 
I'm part of the neomutt group - where we discussed how we want to proceed in terms of coding style. The general consensus is:

* We don't want to diverge much from the Mutt's coding style, as it makes merging mutt's patches more difficult
* We would like to have a better followed/automatically enforced coding style
* Ideally, we would like to have a more widely used coding style, like the linux kernel one.

So, we are thinking about automatically formatting our code using clang-format - specifically if we should create an mutt-like option-set or use an existing sample. (see http://clang.llvm.org/docs/ClangFormatStyleOptions.html#configurable-format-style-options ).

Just out of curiosity: if we use e.g. clang-format and the linux kernel coding style (automatically), would you change it too? 
Do you have any motivation regarding changing the mutt's coding style?

What is your opinion on these issues?

best regards,
Tobias Angele / toogley


More information about the neomutt-devel mailing list