From c0190e41f7f2e5fe30fa8556fa35f43950afbfdb Mon Sep 17 00:00:00 2001 From: adjam Date: Sun, 3 May 2009 23:51:22 +0000 Subject: Importing recode (rekonq code). I'm sorry I coudn't perform this with gitsvn or tailor.. but I cannot lose all the evening just for this. And I need to sleep now.. git-svn-id: svn+ssh://svn.kde.org/home/kde/trunk/playground/network/rekonq@963146 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- scripts/codingstyle.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 scripts/codingstyle.sh (limited to 'scripts/codingstyle.sh') diff --git a/scripts/codingstyle.sh b/scripts/codingstyle.sh new file mode 100755 index 00000000..bb3add49 --- /dev/null +++ b/scripts/codingstyle.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# +# apply rekonq coding style to all cpp and header files in src directory +# +# requirements: installed astyle +# +# rekonq use kdelibs coding style, except for brackets, so while kdelibs coding style +# is +# +# void foo() { +# ... +# } +# +# rekonq uses +# +# void foo() +# { +# ... +# } +# +# I like this way, for me more readable. +# +# Kdelibs coding style is defined in http://techbase.kde.org/Policies/Kdelibs_Coding_Style + + +PWD=$(pwd) + +cd $PWD +cd .. +cd src + +echo "Applying astyle rules..." +astyle \ +--indent=spaces=4 \ +--brackets=break \ +--indent-labels \ +--pad=oper \ +--unpad=paren \ +--one-line=keep-statements \ +--convert-tabs \ +--indent-preprocessor \ +`find -type f -name '*.cpp'` `find -type f -name '*.h'` + +echo "Removing .orig files..." +rm *.orig + +echo "Done!" + -- cgit v1.2.1