mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-21 19:41:14 -03:00
Add clang-tidy to build_tools/lint.fish
This commit is contained in:
committed by
ridiculousfish
parent
321e1ed26a
commit
d7aeac3c61
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user