Krolyxon
Commit 5c3a796

Branches

Refs →

nsxiv.woodpeckeranalysis.yml

27 lines · 913 B · YAML

1pipeline:
2 analysis:
3 image: alpine
4 when:
5 branch: master
6 commands: |
7 apk add --no-cache build-base cppcheck clang-extra-tools \
8 imlib2-dev xorgproto \
9 libxft-dev libexif-dev giflib-dev libwebp-dev >/dev/null
10 make config.h version.h
11 std="c99"
12 run_cppcheck() {
13 cppcheck --std="$std" --enable=performance,portability \
14 --force --quiet --inline-suppr --error-exitcode=1 \
15 --max-ctu-depth=8 -j"$(nproc)" \
16 $(make OPT_DEP_DEFAULT="$1" dump_cppflags) \
17 *.c
18 }
19 run_tidy() {
20 checks="$(sed '/^#/d' .woodpecker/clang-tidy-checks | paste -d ',' -s)"
21 clang-tidy --warnings-as-errors="*" --checks="$checks" --quiet *.c \
22 -- -std="$std" $(make OPT_DEP_DEFAULT="$1" dump_cppflags)
23 }
24 run_cppcheck "0"
25 run_cppcheck "1"
26 run_tidy "0"
27 run_tidy "1"