summaryrefslogtreecommitdiff
path: root/scripts/codingstyle.sh
blob: f0fb984f0064331d0f7005c8387911d8b55fd4cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/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..

{
PWD=$(pwd)

cd $PWD
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'`
}