Statistics
| Branch: | Tag: | Revision:

amiro-os / tools / cpplint / checkOS.sh @ 780997c4

History | View | Annotate | Download (3.741 KB)

1
################################################################################
2
# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
3
# (AMiRo) platform.                                                            #
4
# Copyright (C) 2016..2018  Thomas Schöpping et al.                            #
5
#                                                                              #
6
# This program is free software: you can redistribute it and/or modify         #
7
# it under the terms of the GNU General Public License as published by         #
8
# the Free Software Foundation, either version 3 of the License, or            #
9
# (at your option) any later version.                                          #
10
#                                                                              #
11
# This program is distributed in the hope that it will be useful,              #
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
14
# GNU General Public License for more details.                                 #
15
#                                                                              #
16
# You should have received a copy of the GNU General Public License            #
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
18
#                                                                              #
19
# This research/work was supported by the Cluster of Excellence Cognitive      #
20
# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
21
# funded by the German Research Foundation (DFG).                              #
22
################################################################################
23

    
24
#!/bin/bash
25

    
26
# initial info text
27
printf "######################################################################\n"
28
printf "#                                                                    #\n"
29
printf "#              Welcome to the AMiRo-OS CppLint checker               #\n"
30
printf "#                                                                    #\n"
31
printf "######################################################################\n"
32
printf "#                                                                    #\n"
33
printf "# Copyright (c) 2016..2018  Thomas Schöpping                         #\n"
34
printf "#                                                                    #\n"
35
printf "# This is free software; see the source for copying conditions.      #\n"
36
printf "# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR  #\n"
37
printf "# A PARTICULAR PURPOSE. The development of this software was         #\n"
38
printf "# supported by the Excellence Cluster EXC 227 Cognitive Interaction  #\n"
39
printf "# Technology. The Excellence Cluster EXC 227 is a grant of the       #\n"
40
printf "# Deutsche Forschungsgemeinschaft (DFG) in the context of the German #\n"
41
printf "# Excellence Initiative.                                             #\n"
42
printf "#                                                                    #\n"
43
printf "######################################################################\n"
44
printf "\n"
45

    
46
# print note
47
printf "\n"
48
printf "NOTE: This tool is rather a preview and was not optimized nor tested!\n"
49
printf "      Expect bugs and other issues.\n"
50
printf "\n"
51

    
52
# check the OS
53
ROOT_PATH="../../"
54
read -p "root path:   " -i "$ROOT_PATH" -e ROOT_PATH
55
read -p "output file: " -e OUTPUT_FILE
56

    
57
if [ -z "$OUTPUT_FILE" ]; then
58
  OUTPUT=""
59
else
60
  OUTPUT="2> ${OUTPUT_FILE}"
61
fi
62

    
63
python/cpplint.py --linelength=120 --extensions=h,c,hpp,cpp `find ${ROOT_PATH} \( -iname "*.h" -o -iname "*-c" -o -iname "*.hpp" -o -iname "*.cpp" \) -follow -type f -print` ${OUTPUT}
64

    
65
unset ROOT_PATH
66
unset OUTPUT_FILE
67
unset OUTPUT