Merge "Build and package Layer Management service binaries." into tizen
[profile/ivi/layer-management.git] / scripts / check_style.sh
1 #!/bin/bash
2
3 ###########################################################################
4 #
5 # Copyright 2013 BMW Car IT GmbH
6 #
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #        http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #
19 ###########################################################################
20
21
22
23 DIRECTORY=$(cd `dirname $0` && pwd)
24 cd $DIRECTORY
25 cd ..
26
27 echo $PWD
28 echo "----------------------------------------"
29
30 TEMP_FILENAME=".check_style_temp.`date +%s%N`"
31
32 TARGET_FILES="`find -iname *.cpp -or -iname *.h -or -iname *.c | grep -vi \/tests\/ | grep -vi \/test\/ | grep -vi 3rdParty | grep -vi \/LayerManagerExamples\/ | grep -vi \config\/`"
33
34 for t_file in $TARGET_FILES
35 do
36     python scripts/check_all_styles.py $t_file | tee $TEMP_FILENAME -a
37 done
38
39 LINES=`cat $TEMP_FILENAME | wc -l`
40
41 echo -e "\nTotal number of warnings: $LINES"
42 rm $TEMP_FILENAME