From cf3ed33d14ae911373bf9607a5f693cbe3797b26 Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Wed, 21 Feb 2024 15:51:55 +0000 Subject: [PATCH] Bug fix: clang-tidy checks missing sub-dirs Sub-dirs ./src/pan-view and ./src/view-file were not checked --- meson.build | 2 +- scripts/clang-tidy-check.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index b0d21389..5f459c25 100644 --- a/meson.build +++ b/meson.build @@ -706,7 +706,7 @@ if running_from_git clang_tidy_exe = find_program('clang-tidy', required : false) if clang_tidy_exe.found() git_exe = find_program('git', required : true) - modified_file_list = run_command(git_exe, 'diff', '--name-only', check: true) + modified_file_list = run_command(git_exe, 'diff', '--name-only', './src/*.cc', './src/pan-view/*.cc', './src/view-file/*.cc', check: true) modified_files = modified_file_list.stdout().strip().split('\n') foreach modified_file : modified_files diff --git a/scripts/clang-tidy-check.sh b/scripts/clang-tidy-check.sh index e5c49e8f..04129765 100755 --- a/scripts/clang-tidy-check.sh +++ b/scripts/clang-tidy-check.sh @@ -115,12 +115,12 @@ then $(find src -name "*.cc" | sort) EOF else - total_files=$(git diff --name-only ./src/*.cc | wc --lines) + total_files=$(git diff --name-only ./src/*.cc ./src/pan-view/*.cc ./src/view-file/*.cc | wc --lines) while read -r file do process_file done << EOF -$(git diff --name-only ./src/*.cc | sort) +$(git diff --name-only ./src/*.cc ./src/pan-view/*.cc ./src/view-file/*.cc | sort) EOF fi -- 2.20.1