summaryrefslogtreecommitdiff
path: root/tools/ci/jobs/nsiqcppstyle.sh
blob: e1969e182b353688fd526605e01cd38dd3e319ba (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
#!/usr/bin/env bash

export LOGFILE=nsiqcppstyle.log

source ./tools/ci/scripts/init.sh

rm -rf nsiqcppstyle.git
./tools/ci/scripts/retry.sh git clone https://gitlab.com/4144/nsiqcppstyle nsiqcppstyle.git

./nsiqcppstyle.git/nsiqcppstyle --ci --show-url src \
| grep -v "catch.hpp" \
| grep -v "doctest.h" \
| grep -v "sdl2gfx" \
| grep -v "/debug/" \
>logs/nsiqcppstyle1.log

cat logs/nsiqcppstyle1.log \
| grep -v -E "gamemodifiers[.]cpp(.+):  Incorrect align on long parameter list in front of '(N_|{|})'" \
| grep -v -E "graphics_calcImageRect[.]hpp(.+):  function [(]calcTileVertexesInline[)] has non named parameter" \
| grep -v -E "dye[.]cpp(.+):  Do not use goto keyword" \
| grep -v -E "item/item[.]cpp(.+):  function [(]dragDrop[)] has non named parameter" \
| grep -v -E "windowmenu[.]cpp(.+):  function [(]addButton[)] has non named parameter" \
| grep -v -E "windowmenu[.]cpp(.+):  Incorrect align on long parameter list in front of '(.|Visible_true)', it should be aligen in column 15" \
| grep -v -E "channeltab[.]h(.+):  Incorrect align on long parameter list in front of 'const'" \
| grep -v -E "/enums/simpletypes/(.+):  function [(]defIntEnum[)] has non named parameter" \
>${ERRFILE}

export data=$(cat ${ERRFILE})
if [ "$DATA" != "" ]; then
    echo "Warnings detected"
    cat ${ERRFILE}
fi