mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
fix IWYU lint
Commit 8645aa94
was made because it seemed necessary at the time. However,
when I run `make lint-all` now it complains about include loops for header
`signal.h`. This reverts part of that earlier commit to get sane behavior
from IWYU again.
This commit is contained in:
parent
44cfe3e340
commit
949fc7bdd7
1 changed files with 6 additions and 4 deletions
|
@ -35,13 +35,15 @@ for arg in $argv
|
||||||
set cppcheck_args $cppcheck_args $arg
|
set cppcheck_args $cppcheck_args $arg
|
||||||
else if string match -q -- '-I*' $arg
|
else if string match -q -- '-I*' $arg
|
||||||
set cppcheck_args $cppcheck_args $arg
|
set cppcheck_args $cppcheck_args $arg
|
||||||
|
else if string match -q -- '-iquote*' $arg
|
||||||
|
set cppcheck_args $cppcheck_args $arg
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Not sure when this became necessary but without these flags cppcheck no longer works on macOS.
|
# Not sure when this became necessary but without these flags cppcheck no longer works on macOS.
|
||||||
# It complains that "Cppcheck cannot find all the include files." It appears that cppcheck used
|
# It complains that "Cppcheck cannot find all the include files." Adding these include paths should
|
||||||
# to, but no longer, recognizes the -iquote flag. So switch to hardcoding the appropriate -I flags.
|
# be harmless everywhere else.
|
||||||
set cppcheck_args $cppcheck_args -I . -I ./src
|
set cppcheck_args $cppcheck_args -I /usr/include -I .
|
||||||
|
|
||||||
if test "$machine_type" = "x86_64"
|
if test "$machine_type" = "x86_64"
|
||||||
set cppcheck_args -D__x86_64__ -D__LP64__ $cppcheck_args
|
set cppcheck_args -D__x86_64__ -D__LP64__ $cppcheck_args
|
||||||
|
@ -114,7 +116,7 @@ if set -q c_files[1]
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo ========================================
|
echo ========================================
|
||||||
echo 'Running `cppcheck --check-config` to identify missing includes similar problems.'
|
echo 'Running `cppcheck --check-config` to identify missing includes and similar problems.'
|
||||||
echo 'Ignore unmatchedSuppression warnings as they are probably false positives we'
|
echo 'Ignore unmatchedSuppression warnings as they are probably false positives we'
|
||||||
echo 'cannot suppress.'
|
echo 'cannot suppress.'
|
||||||
echo ========================================
|
echo ========================================
|
||||||
|
|
Loading…
Reference in a new issue