summaryrefslogtreecommitdiff
path: root/scripts/codingstyle.sh
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-03-28 15:48:24 +0100
committerAndrea Diamantini <adjam7@gmail.com>2009-03-28 15:48:24 +0100
commit9e4dca9b627276d4558e9ec8a8475c136e7935f9 (patch)
treee6421d574d96715198589606e83912011aae9bd6 /scripts/codingstyle.sh
parentAdded QNetworkDiskCache. Thanks to Ben Meyer's Qt Blog post (diff)
downloadrekonq-9e4dca9b627276d4558e9ec8a8475c136e7935f9.tar.xz
scripts
Diffstat (limited to 'scripts/codingstyle.sh')
-rw-r--r--scripts/codingstyle.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/codingstyle.sh b/scripts/codingstyle.sh
new file mode 100644
index 00000000..ce24a5a1
--- /dev/null
+++ b/scripts/codingstyle.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# apply kdelibs coding style to all c, cpp and header files in src directory
+# requirements: installed astyle
+#
+# The coding style is defined in http://techbase.kde.org/Policies/Kdelibs_Coding_Style
+#
+# In rekonq we use some little different rules..
+
+{
+cd ..
+cd src
+
+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'`
+} \ No newline at end of file