Source reindenting
От | Magnus Hagander |
---|---|
Тема | Source reindenting |
Дата | |
Msg-id | AANLkTi=KNTbrDtX_ADJQani5W56gLFpCCeAWoHYme-ba@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Source reindenting
|
Список | pgadmin-hackers |
I just did a testrun with astyle to reindent and restyle the code. I created a rule in Makefile.am per: diff --git a/Makefile.am b/Makefile.am index be6af45..8266f8d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -65,3 +65,13 @@ endif # We need to ensure the help cache is world writeable install-data-hook: chmod 0666 $(help_cache) + +# Perform astyle cleanup per rules: +# * -p - insert space around parenthesis +# * -b - bracket style +# * -S - indent switches +# * -s4 - intent with spaces, 4 of them +# * -k3 - align pointer or reference operators +# Also add the -n to make it not save .orig files (we have git for that) +style: + astyle -n -p -b -S -s4 -k3 `find . -name "*.cpp" -o -name "*.h" | egrep -v "(wx-build|xrcDialogs|pgscript/test)"` diffstat for the whole thing is: 631 files changed, 36590 insertions(+), 30757 deletions(-) And yes, it is smart enough not to edit things if I run it again - phew. I've pushed a branch to github for your reviewing pleasure: https://github.com/mhagander/pgadmin3/compare/master...reindent It's going to cause merge conflicts like hell. but it's going to do that whenever we run it. So should we just go ahead and run it? -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
В списке pgadmin-hackers по дате отправления: