Add clang-tidy to build_tools/lint.fish

This commit is contained in:
Lior Stern
2020-04-01 19:33:31 +03:00
committed by ridiculousfish
parent 321e1ed26a
commit d7aeac3c61
2 changed files with 12 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ set all no
set kernel_name (uname -s)
set machine_type (uname -m)
argparse a/all -- $argv
argparse a/all p/project= -- $argv
# We only want -D and -I options to be passed thru to cppcheck.
for arg in $argv
@@ -117,6 +117,14 @@ if set -q c_files[1]
# output will expect those messages to be written to stdout.
oclint $c_files -- $argv 2>&1
end
if type -q clang-tidy; and set -q _flag_project
echo
echo ========================================
echo Running clang-tidy
echo ========================================
clang-tidy -p $_flag_project $c_files
end
else
echo
echo 'WARNING: No C/C++ files to check'