Page 1 of 1

Code style for CodeLite

Posted: Sat Jun 03, 2017 1:51 pm
by AJenbo
What code style should I use when developing on CL? I find that both clang and astyle by default change a lot about the code in various files when I enable CodeFormatter while developing on CodeLite it self.

Re: Code style for CodeLite

Posted: Sat Jun 03, 2017 3:39 pm
by eranif
There is this wiki page I wrote a while back: http://codelite.org/Developers/CodingGuidelines

I will probably convert it into .editorconfig and will add it to git repo - this will force the coding guidelines (most of them...)

Re: Code style for CodeLite

Posted: Sat Jun 03, 2017 11:31 pm
by AJenbo
Thanks that helped clarify some things.

Re: Code style for CodeLite

Posted: Mon Jun 05, 2017 2:38 pm
by AJenbo
Maybe it be a good idea to also create a .clang_format file:
http://clangformat.com/

Re: Code style for CodeLite

Posted: Sat Jun 10, 2017 9:18 pm
by eranif
A good idea, I wonder if you should add an option to "export" the current clang-format settings to a file

Re: Code style for CodeLite

Posted: Mon Jun 12, 2017 10:59 am
by AJenbo
Sounds like a worthy cause, the same could be done for phpcsfixer and phpcbf. It's also possible to do for phpcs and phpmd though at the moment I haven't made any config option so they actually rely on external tools that are able to do this (there is a descent online tool for both so it's less pressing, phpcbf and phpcs also read the same configuration).

Re: Code style for CodeLite

Posted: Mon Jun 12, 2017 11:01 am
by AJenbo
I already have a branch where about a third of the phpcsfixer options are exposed, but it still needs some work before it's ready to merge.