any objections against passing astyle to get uniform sources for Krusader ?
At the moment, we have _many_ different styles over the sources.
I would like to using kdelibs coding style as a script is already provided:
http://techbase.kde.org/Policies/Kdelibs_Coding_Style#Artistic_Style_.28astyle.29_automatic_code_formatting
As Csaba have committed his lister prototype ;), it could be a good timing to
do it right now.
thoughts ?
cheers,
Fathi
astyle \
--brackets=linux \
--convert-tabs \
--indent-labels \
--indent-preprocessor \
--indent=spaces=4
--one-line=keep-statements \
--pad=oper \
--unpad=paren \
`find -type f -name '*.cpp'` `find -type f -name '*.cc'` `find -type f -name '*.h'`
It can be added to ~/.astylerc
> I've created screenshots of my kdevelop settings (based on the artistic
> style). Please let me know if they are OK.
in "tab & brackets":
--indent=spaces=4 => use spaces: 4
--convert-tabs => check convert tabs
--brackets=linux => Linux style
in "indentation"
--indent-labels => check labels
--indent-preprocessor => check preprocessor
in "formatting"
--unpad=paren => check remove unnecessary spaces around parentheses
--pad=oper => check add spaces around operators
--one-line=keep-statements => check keep on-line statements
> The best would be to autoformat every code before committing.
if you use shell, you can script "astyle-krusader && svn commit".
> Once we have consent on the coding style it would be useful to put it
> onto the webpage.
right
cheers,
Fathi
I see it the other way, using tabs is awfull:
- difficult to read
- cannot indent parameters properly
- inconsistent with popular coding style (Qt, KDE, etc ...)
any other opinions on the spaces vs tabs indentations ?
and was taken as you have intended, a joke :)
> Just try and google for "spaces vs tabs indentations" it's a fun read...
I've done it, right after reading your initial mail ;) yeah, very funny!
There's so much articles on the subject.
It's impossible to get a proper opinion as it's a taste question and
mostly a personal point of view.
> http://www.iovene.com/tabs-vs-spaces-the-end-of-the-debate/
nice one.
good point for people using tabs for indenting. alignment shoud use spaces.