summaryrefslogtreecommitdiff
path: root/tools/ci/scripts/deheaderS.sh
blob: c97e5a1da26fe553135bbe5d5bcfc24c9b320f63 (plain) (blame)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash

export var=$1
export name=${var%.*}
export name=${name#./src/}
export name=${name##*./}.h
export dir=$(pwd)

if [[ $var =~ .*(/sdl2gfx/|src/debug/).* ]]
then
   exit 0
fi

if [ "$skipPath" != "" ];
then
    if [[ $var =~ .*($skipPath).* ]]
    then
        exit 0
    fi
fi

echo $1 >>${LOGFILE}
echo $1

${dir}/deheader -q -i "\"debug.h\"" \
-i "\"utils/checkutils.h\"" \
-i "\"utils/sdlcheckutils.h\"" \
-i "\"sdlshared.h\"" \
-i "\"localconsts.h\"" \
-i "\"utils/fuzzer.h\"" \
-i "\"$name\"" \
-c "$CXX" \
-d "$FLAGS" \
-s "-std=gnu++1z" \
-S "-std=gnu++1z" \
-m "-c -Werror -Wall -Wextra -Wundef -Wmissing-declarations -DLOCALEDIR=\\\"\\\" -I/usr/include $INCLUDES -I${dir}/src" $1 2>&1 | \
grep -v "deheader: ./src/net/sdltcpnet.cpp has more than one inclusion of <netinet/tcp.h>" | \
grep -v "deheader: remove <netinet/tcp.h> from ./src/net/sdltcpnet.cpp" | \
grep -v "deheader: remove <climits> from ./src/resources/db/unitsdb.cpp" | \
grep -v "portability requires" | \
grep -v "SDL2_rotozoom.cpp" | \
grep -v "doctest.h" | \
tee -a ${LOGFILE}