Krolyxon
Commit 19b4719

Branches

Refs →

nsxivetcwoodpeckeranalysis.sh

21 lines · 626 B · Bourne Again Shell (bash)

1#!/bin/sh -e
2
3std="c99"
4
5run_cppcheck() {
6 cppcheck --std="$std" --enable=performance,portability \
7 --force --quiet --inline-suppr --error-exitcode=1 \
8 --max-ctu-depth=8 -j"$(nproc)" \
9 $(make OPT_DEP_DEFAULT="$1" dump_cppflags) \
10 --suppress=varFuncNullUB --suppress=uninitvar \
11 *.c
12}
13
14run_tidy() {
15 checks="$(sed '/^#/d' etc/woodpecker/clang-tidy-checks | paste -d ',' -s)"
16 clang-tidy --warnings-as-errors="*" --checks="$checks" --quiet *.c \
17 -- -std="$std" $(make OPT_DEP_DEFAULT="$1" dump_cppflags)
18}
19
20run_cppcheck "0"; run_cppcheck "1";
21run_tidy "0"; run_tidy "1";