build_tools/lint.fish: correct cppcheck config location

Which was moved in 9b3bfb63d ("cppcheck: Move config files to build_tools")
Also get rid of the nonstandard cppcheck output format.
This commit is contained in:
Johannes Altmanninger 2020-12-24 11:13:39 +01:00
parent 69a9785f50
commit 53d922bde6
2 changed files with 4 additions and 17 deletions

View file

@ -1,7 +1,7 @@
#!/bin/sh
cppcheck --enable=all --std=posix --quiet \
--suppressions-list=build_tools/cppcheck.suppressions \
cppcheck --std=posix --quiet \
--suppressions-list=build_tools/cppcheck.suppressions --inline-suppr \
--rule-file=build_tools/cppcheck.rules \
--force \
./src/
${@:---enable=all ./src/}

View file

@ -83,20 +83,7 @@ if set -q c_files[1]
echo ========================================
echo Running cppcheck
echo ========================================
# The stderr to stdout redirection is because cppcheck, incorrectly IMHO, writes its
# diagnostic messages to stderr. Anyone running this who wants to capture its output will
# expect those messages to be written to stdout.
set -l cn (set_color normal)
set -l cb (set_color --bold)
set -l cu (set_color --underline)
set -l cm (set_color magenta)
set -l cbrm (set_color brmagenta)
set -l template "[$cb$cu{file}$cn$cb:{line}$cn] $cbrm{severity}$cm ({id}):$cn\n {message}"
set cppcheck_args -q --verbose --std=c++11 --std=posix --language=c++ --template $template \
--suppress=missingIncludeSystem --inline-suppr --enable=$cppchecks \
--rule-file=.cppcheck.rules --suppressions-list=.cppcheck.suppressions $cppcheck_args
cppcheck $cppcheck_args $c_files 2>&1
build_tools/cppcheck.sh --enable=$cppchecks $c_files 2>&1
echo
echo ========================================