From 92316449121e58e82551b0573af3af42a60c2b45 Mon Sep 17 00:00:00 2001 From: kminoda Date: Tue, 4 Jun 2024 16:23:31 +0900 Subject: [PATCH] update regex Signed-off-by: kminoda --- .github/workflows/cppcheck-differential.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cppcheck-differential.yaml b/.github/workflows/cppcheck-differential.yaml index 2cd5011834463..efa44a66d9376 100644 --- a/.github/workflows/cppcheck-differential.yaml +++ b/.github/workflows/cppcheck-differential.yaml @@ -36,7 +36,7 @@ jobs: - name: Run Cppcheck on changed files run: | - files=$(cat changed_files.txt | grep '\.cpp$\|\.hpp$' | tr '\n' ' ') + files=$(cat changed_files.txt | grep -E '\.(cpp|hpp)$' || true) if [ -n "$files" ]; then echo "Running Cppcheck on changed files: $files" cppcheck --enable=all --inconclusive --check-level=exhaustive --suppressions-list=.cppcheck_suppressions --xml $files 2> cppcheck-report.xml