From 48ad3ff458a5778a28760317e80cce39a6c787d0 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Sat, 2 Sep 2023 23:37:18 +0200 Subject: [PATCH 01/10] [#94]: Don't run SA on all files when is enabled, just to later filter out the result --- entrypoint.sh | 17 +++++++++++++---- src/get_files_to_check.py | 27 ++++++++++++++++++--------- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 85ad79c..d225de0 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -20,6 +20,15 @@ print_to_console=${INPUT_FORCE_CONSOLE_PRINT} debug_print "Using CMake = $INPUT_USE_CMAKE" debug_print "Print to console = $print_to_console" +preselected_files="" +if [ "$INPUT_REPORT_PR_CHANGES_ONLY" = true ]; then + echo "The 'report_pr_changes_only' option is enabled. Running SA only on modified files." + common_ancestor=$(git merge-base origin/"$GITHUB_BASE_REF" feature_branch) + git diff --name-only "$common_ancestor" feature_branch | grep -E '\.(c|cpp)$' > list_of_changed_files.txt + debug_print "$(cat list_of_changed_files.txt)" + preselected_files="$(cat list_of_changed_files.txt)" +fi + if [ "$print_to_console" = true ]; then echo "The 'force_console_print' option is enabled. Printing output to console." elif [ -z "$INPUT_PR_NUM" ]; then @@ -71,11 +80,11 @@ if [ "$INPUT_USE_CMAKE" = true ]; then fi if [ -z "$INPUT_EXCLUDE_DIR" ]; then - files_to_check=$(python3 /get_files_to_check.py -dir="$GITHUB_WORKSPACE") - debug_print "Running: files_to_check=python3 /get_files_to_check.py -dir=\"$GITHUB_WORKSPACE\")" + files_to_check=$(python3 /get_files_to_check.py -dir="$GITHUB_WORKSPACE" -preselected="$preselected_files") + debug_print "Running: files_to_check=python3 /get_files_to_check.py -dir=\"$GITHUB_WORKSPACE\" -preselected=\"$preselected_files\")" else - files_to_check=$(python3 /get_files_to_check.py -exclude="$GITHUB_WORKSPACE/$INPUT_EXCLUDE_DIR" -dir="$GITHUB_WORKSPACE") - debug_print "Running: files_to_check=python3 /get_files_to_check.py -exclude=\"$GITHUB_WORKSPACE/$INPUT_EXCLUDE_DIR\" -dir=\"$GITHUB_WORKSPACE\")" + files_to_check=$(python3 /get_files_to_check.py -exclude="$GITHUB_WORKSPACE/$INPUT_EXCLUDE_DIR" -dir="$GITHUB_WORKSPACE" -preselected="$preselected_files") + debug_print "Running: files_to_check=python3 /get_files_to_check.py -exclude=\"$GITHUB_WORKSPACE/$INPUT_EXCLUDE_DIR\" -dir=\"$GITHUB_WORKSPACE\" -preselected=\"$preselected_files\")" fi debug_print "Files to check = $files_to_check" diff --git a/src/get_files_to_check.py b/src/get_files_to_check.py index d4af089..834e04e 100644 --- a/src/get_files_to_check.py +++ b/src/get_files_to_check.py @@ -2,7 +2,7 @@ from pathlib import Path -def get_files_to_check(directory_in, excludes_in): +def get_files_to_check(directory_in, excludes_in, preselected_files): """ Given a directory path and a string of prefixes to exclude, return a space-separated string of all files in the directory (and its subdirectories) @@ -11,6 +11,7 @@ def get_files_to_check(directory_in, excludes_in): Args: directory_in (str): The path to the directory to search for files. excludes_in (str): A space-separated string of prefixes to exclude from the search. + preselected_files (str): If present, then it's the list of files to be checked (minus excluded ones) Returns: str: A space-separated string of file paths that meet the search criteria. @@ -26,12 +27,18 @@ def get_files_to_check(directory_in, excludes_in): supported_extensions = (".h", ".hpp", ".hcc", ".c", ".cc", ".cpp", ".cxx") all_files = [] - for path in Path(directory_in).rglob("*.*"): - path_ = str(path.resolve()) - if path_.endswith(supported_extensions) and not path_.startswith( - tuple(exclude_prefixes) - ): - all_files.append(path_) + if len(preselected_files) == 1: + for path in Path(directory_in).rglob("*.*"): + path_ = str(path.resolve()) + if path_.endswith(supported_extensions) and not path_.startswith( + tuple(exclude_prefixes) + ): + all_files.append(path_) + else: + for file in preselected_files: + print(f"File = {file}") + if not file.endswith(tuple(exclude_prefixes)): + all_files.append(file) return " ".join(all_files) @@ -39,9 +46,11 @@ def get_files_to_check(directory_in, excludes_in): if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("-exclude", help="Exclude prefix", required=False) - parser.add_argument("-dir", help="Current directory", required=True) + parser.add_argument("-preselected", help="Preselected files", required=False) + parser.add_argument("-dir", help="Source directory", required=True) directory = parser.parse_args().dir + preselected = parser.parse_args().preselected excludes = parser.parse_args().exclude - print(get_files_to_check(directory, excludes)) + print(get_files_to_check(directory, excludes, preselected)) From 7d9bc491df472960a15a64240278ce5ff778568f Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Sat, 2 Sep 2023 23:42:47 +0200 Subject: [PATCH 02/10] [#94]: Fix tests --- src/get_files_to_check.py | 2 +- test/test_static_analysis.py | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/get_files_to_check.py b/src/get_files_to_check.py index 834e04e..7524146 100644 --- a/src/get_files_to_check.py +++ b/src/get_files_to_check.py @@ -27,7 +27,7 @@ def get_files_to_check(directory_in, excludes_in, preselected_files): supported_extensions = (".h", ".hpp", ".hcc", ".c", ".cc", ".cpp", ".cxx") all_files = [] - if len(preselected_files) == 1: + if len(preselected_files) == 0: for path in Path(directory_in).rglob("*.*"): path_ = str(path.resolve()) if path_.endswith(supported_extensions) and not path_.startswith( diff --git a/test/test_static_analysis.py b/test/test_static_analysis.py index a0926ea..991d4a5 100644 --- a/test/test_static_analysis.py +++ b/test/test_static_analysis.py @@ -185,7 +185,7 @@ def test_get_files_to_check(self): f"{pwd}/utils/dummy_project/exclude_dir_2/ExcludedFile2.hpp", ] result = get_files_to_check.get_files_to_check( - f"{pwd}/utils/dummy_project", None + f"{pwd}/utils/dummy_project", None, "" ) self.assertEqual(to_list_and_sort(result), expected) @@ -197,7 +197,7 @@ def test_get_files_to_check(self): f"{pwd}/utils/dummy_project/exclude_dir_2/ExcludedFile2.hpp", ] result = get_files_to_check.get_files_to_check( - f"{pwd}/utils/dummy_project", f"{pwd}/utils/dummy_project/exclude_dir_1" + f"{pwd}/utils/dummy_project", f"{pwd}/utils/dummy_project/exclude_dir_1", "" ) self.assertEqual(to_list_and_sort(result), expected) @@ -210,6 +210,15 @@ def test_get_files_to_check(self): result = get_files_to_check.get_files_to_check( f"{pwd}/utils/dummy_project", f"{pwd}/utils/dummy_project/exclude_dir_1 {pwd}/utils/dummy_project/exclude_dir_2", + "", + ) + + # Preselected files present + expected = [f"{pwd}/utils/dummy_project/DummyFile.cpp"] + result = get_files_to_check.get_files_to_check( + f"{pwd}/utils/dummy_project", + f"{pwd}/utils/dummy_project/exclude_dir_1 {pwd}/utils/dummy_project/exclude_dir_2", + f"{pwd}/utils/dummy_project/DummyFile.cpp {pwd}/utils/dummy_project/exclude_dir_1/ExcludedFile1.hpp", ) From 4a479801ec76386e30ee90feca6adac428628057 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Sun, 3 Sep 2023 00:33:13 +0200 Subject: [PATCH 03/10] [#94]: Fix issue with git error --- entrypoint.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index d225de0..e7c4249 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -20,15 +20,6 @@ print_to_console=${INPUT_FORCE_CONSOLE_PRINT} debug_print "Using CMake = $INPUT_USE_CMAKE" debug_print "Print to console = $print_to_console" -preselected_files="" -if [ "$INPUT_REPORT_PR_CHANGES_ONLY" = true ]; then - echo "The 'report_pr_changes_only' option is enabled. Running SA only on modified files." - common_ancestor=$(git merge-base origin/"$GITHUB_BASE_REF" feature_branch) - git diff --name-only "$common_ancestor" feature_branch | grep -E '\.(c|cpp)$' > list_of_changed_files.txt - debug_print "$(cat list_of_changed_files.txt)" - preselected_files="$(cat list_of_changed_files.txt)" -fi - if [ "$print_to_console" = true ]; then echo "The 'force_console_print' option is enabled. Printing output to console." elif [ -z "$INPUT_PR_NUM" ]; then @@ -62,6 +53,16 @@ if [ "$GITHUB_EVENT_NAME" = "pull_request_target" ] && [ -n "$INPUT_PR_REPO" ]; export GITHUB_WORKSPACE=$(pwd) fi +preselected_files="" +if [ "$INPUT_REPORT_PR_CHANGES_ONLY" = true ]; then + echo "The 'report_pr_changes_only' option is enabled. Running SA only on modified files." + git config --global --add safe.directory /github/workspace + git fetch origin + common_ancestor=$(git merge-base origin/"$GITHUB_BASE_REF" "origin/$GITHUB_HEAD_REF") + preselected_files="$(git diff --name-only "$common_ancestor" "origin/$GITHUB_HEAD_REF" | grep -E '\.(c|cpp|h|hpp)$')" + debug_print "Preselected files: \n$preselected_files" +fi + debug_print "GITHUB_WORKSPACE = ${GITHUB_WORKSPACE} INPUT_EXCLUDE_DIR = ${INPUT_EXCLUDE_DIR} use_extra_directory = ${use_extra_directory}" mkdir -p build From 50d7e0061223e3f912c355eea3c6236e8bd74c78 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Sun, 3 Sep 2023 16:19:00 +0200 Subject: [PATCH 04/10] [#94]: Fix get_files_to_check.py --- src/get_files_to_check.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/get_files_to_check.py b/src/get_files_to_check.py index 7524146..e0b1d47 100644 --- a/src/get_files_to_check.py +++ b/src/get_files_to_check.py @@ -36,8 +36,9 @@ def get_files_to_check(directory_in, excludes_in, preselected_files): all_files.append(path_) else: for file in preselected_files: - print(f"File = {file}") - if not file.endswith(tuple(exclude_prefixes)): + if not file.startswith(directory_in): + file = f"{directory_in}/{file}" + if not file.startswith(tuple(exclude_prefixes)): all_files.append(file) return " ".join(all_files) @@ -46,11 +47,11 @@ def get_files_to_check(directory_in, excludes_in, preselected_files): if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("-exclude", help="Exclude prefix", required=False) - parser.add_argument("-preselected", help="Preselected files", required=False) + parser.add_argument("-preselected", help="Preselected files", default="", required=False) parser.add_argument("-dir", help="Source directory", required=True) directory = parser.parse_args().dir preselected = parser.parse_args().preselected excludes = parser.parse_args().exclude - print(get_files_to_check(directory, excludes, preselected)) + print(get_files_to_check(directory, excludes, preselected.split())) From 0c22904d726e14035d3787661fb2d9ea5f3d946a Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Fri, 8 Sep 2023 14:32:28 +0200 Subject: [PATCH 05/10] [#94]: Potential fix for clang-tidy when not using CMake --- entrypoint.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index e7c4249..e748d5d 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -100,14 +100,18 @@ if [ "$INPUT_USE_CMAKE" = true ]; then debug_print "Running cppcheck --project=compile_commands.json $INPUT_CPPCHECK_ARGS --output-file=cppcheck.txt -i$GITHUB_WORKSPACE/$INPUT_EXCLUDE_DIR ..." eval cppcheck --project=compile_commands.json "$INPUT_CPPCHECK_ARGS" --output-file=cppcheck.txt -i"$GITHUB_WORKSPACE/$INPUT_EXCLUDE_DIR" "$GITHUB_WORKSPACE" || true fi + + # Excludes for clang-tidy are handled in python script + debug_print "Running run-clang-tidy-15 $INPUT_CLANG_TIDY_ARGS -p $(pwd) $files_to_check >>clang_tidy.txt 2>&1" + eval run-clang-tidy-15 "$INPUT_CLANG_TIDY_ARGS" -p "$(pwd)" "$files_to_check" >clang_tidy.txt 2>&1 || true + else # Excludes for clang-tidy are handled in python script debug_print "Running cppcheck $files_to_check $INPUT_CPPCHECK_ARGS --output-file=cppcheck.txt ..." eval cppcheck "$files_to_check" "$INPUT_CPPCHECK_ARGS" --output-file=cppcheck.txt || true -fi -# Excludes for clang-tidy are handled in python script -debug_print "Running run-clang-tidy-15 $INPUT_CLANG_TIDY_ARGS -p $(pwd) $files_to_check >>clang_tidy.txt 2>&1" -eval run-clang-tidy-15 "$INPUT_CLANG_TIDY_ARGS" -p "$(pwd)" "$files_to_check" >clang_tidy.txt 2>&1 || true + debug_print "Running run-clang-tidy-15 $INPUT_CLANG_TIDY_ARGS $files_to_check >>clang_tidy.txt 2>&1" + eval run-clang-tidy-15 "$INPUT_CLANG_TIDY_ARGS" "$files_to_check" >clang_tidy.txt 2>&1 || true +fi python3 /run_static_analysis.py -cc cppcheck.txt -ct clang_tidy.txt -o "$print_to_console" -fk "$use_extra_directory" From 6008ad07f61e1c986dbc73b1d9be0a80660a03c9 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Tue, 12 Sep 2023 10:39:13 +0200 Subject: [PATCH 06/10] [#94]: Add debug print for CMake command --- entrypoint.sh | 1 + src/get_files_to_check.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index e748d5d..e06ef2d 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -77,6 +77,7 @@ fi cd build if [ "$INPUT_USE_CMAKE" = true ]; then + debug_print "Running cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON $INPUT_CMAKE_ARGS .." cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON "$INPUT_CMAKE_ARGS" .. fi diff --git a/src/get_files_to_check.py b/src/get_files_to_check.py index e0b1d47..3cf8f45 100644 --- a/src/get_files_to_check.py +++ b/src/get_files_to_check.py @@ -47,7 +47,9 @@ def get_files_to_check(directory_in, excludes_in, preselected_files): if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("-exclude", help="Exclude prefix", required=False) - parser.add_argument("-preselected", help="Preselected files", default="", required=False) + parser.add_argument( + "-preselected", help="Preselected files", default="", required=False + ) parser.add_argument("-dir", help="Source directory", required=True) directory = parser.parse_args().dir From ca13b15bbb2f8046fa0737ff74ac804a09045e60 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Tue, 12 Sep 2023 10:48:04 +0200 Subject: [PATCH 07/10] [#94]: Evaluate custom CMake argsto prevent issues --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index e06ef2d..8795817 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -78,7 +78,7 @@ cd build if [ "$INPUT_USE_CMAKE" = true ]; then debug_print "Running cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON $INPUT_CMAKE_ARGS .." - cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON "$INPUT_CMAKE_ARGS" .. + eval cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON "$INPUT_CMAKE_ARGS" .. fi if [ -z "$INPUT_EXCLUDE_DIR" ]; then From 803162178258471b90ffde97dc8e18d5d3179f67 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Tue, 12 Sep 2023 10:55:32 +0200 Subject: [PATCH 08/10] [#94]: Set source/build directories for CMake --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 8795817..f92e047 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -77,8 +77,8 @@ fi cd build if [ "$INPUT_USE_CMAKE" = true ]; then - debug_print "Running cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON $INPUT_CMAKE_ARGS .." - eval cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON "$INPUT_CMAKE_ARGS" .. + debug_print "Running cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON $INPUT_CMAKE_ARGS -S $GITHUB_WORKSPACE -B $(pwd)" + eval "cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON $INPUT_CMAKE_ARGS -S $GITHUB_WORKSPACE -B $(pwd)" fi if [ -z "$INPUT_EXCLUDE_DIR" ]; then From 9a3231e8cb6fba90f6b5ca6480c38033a2c1476e Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Tue, 12 Sep 2023 11:12:07 +0200 Subject: [PATCH 09/10] [#96]: Try trimming new lines in cmake_args input --- entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index f92e047..e184871 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -77,6 +77,8 @@ fi cd build if [ "$INPUT_USE_CMAKE" = true ]; then + # Trim trailing newlines + INPUT_CMAKE_ARGS="${INPUT_CMAKE_ARGS%"${INPUT_CMAKE_ARGS##*[![:space:]]}"}" debug_print "Running cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON $INPUT_CMAKE_ARGS -S $GITHUB_WORKSPACE -B $(pwd)" eval "cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON $INPUT_CMAKE_ARGS -S $GITHUB_WORKSPACE -B $(pwd)" fi From 8aaadf5f5583b3e03f3da69f78844b9ba113f5c6 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Tue, 12 Sep 2023 12:18:28 +0200 Subject: [PATCH 10/10] [#97]: Update base image --- docker/static_analysis.dockerfile | 54 ++++++++++++++----------------- entrypoint.sh | 8 ++--- 2 files changed, 29 insertions(+), 33 deletions(-) diff --git a/docker/static_analysis.dockerfile b/docker/static_analysis.dockerfile index 12b9463..dd36a7f 100644 --- a/docker/static_analysis.dockerfile +++ b/docker/static_analysis.dockerfile @@ -1,34 +1,30 @@ -FROM ubuntu:22.10 as base +FROM ubuntu:23.04 as base +# Define versions as environment variables +ENV CLANG_VERSION=16 +ENV CPPCHECK_VERSION=2.12.0 + +# Other environment variables ENV CXX=clang++ ENV CC=clang - ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y build-essential \ - python3 python3-pip git clang-15 clang-tidy-15 wget libssl-dev ninja-build && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* -RUN pip3 install PyGithub - -RUN ln -s \ - "$(which clang++-15)" \ - /usr/bin/clang++ - -RUN ln -s \ - "$(which clang-15)" \ - /usr/bin/clang - -RUN ln -s \ - /usr/bin/python3 \ - /usr/bin/python - -RUN git clone https://github.com/Kitware/CMake.git && \ - cd CMake && ./bootstrap && \ - make -j4 && make install - -RUN wget 'https://sourceforge.net/projects/cppcheck/files/cppcheck/2.9/cppcheck-2.9.tar.gz/download' && \ - tar xf download && \ - cd cppcheck-2.9 && mkdir build && cd build && \ - cmake -G "Ninja" .. && ninja install - +# Install dependencies +RUN apt-get update && apt-get install -y \ + build-essential python3 python3-pip git clang-$CLANG_VERSION clang-tidy-$CLANG_VERSION wget libssl-dev ninja-build \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && pip3 install PyGithub --break-system-packages \ + && ln -s "$(which clang++-$CLANG_VERSION)" /usr/bin/clang++ \ + && ln -s "$(which clang-$CLANG_VERSION)" /usr/bin/clang \ + && ln -s /usr/bin/python3 /usr/bin/python + +WORKDIR /opt + +# Build CMake from source +RUN git clone https://github.com/Kitware/CMake.git \ + && cd CMake && ./bootstrap && make -j4 && make install + +# Install cppcheck +RUN git clone https://github.com/danmar/cppcheck.git \ + && cd cppcheck && git checkout tags/$CPPCHECK_VERSION && mkdir build && cd build && cmake -G Ninja .. && ninja all && ninja install diff --git a/entrypoint.sh b/entrypoint.sh index e184871..850995d 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -105,16 +105,16 @@ if [ "$INPUT_USE_CMAKE" = true ]; then fi # Excludes for clang-tidy are handled in python script - debug_print "Running run-clang-tidy-15 $INPUT_CLANG_TIDY_ARGS -p $(pwd) $files_to_check >>clang_tidy.txt 2>&1" - eval run-clang-tidy-15 "$INPUT_CLANG_TIDY_ARGS" -p "$(pwd)" "$files_to_check" >clang_tidy.txt 2>&1 || true + debug_print "Running run-clang-tidy-16 $INPUT_CLANG_TIDY_ARGS -p $(pwd) $files_to_check >>clang_tidy.txt 2>&1" + eval run-clang-tidy-16 "$INPUT_CLANG_TIDY_ARGS" -p "$(pwd)" "$files_to_check" >clang_tidy.txt 2>&1 || true else # Excludes for clang-tidy are handled in python script debug_print "Running cppcheck $files_to_check $INPUT_CPPCHECK_ARGS --output-file=cppcheck.txt ..." eval cppcheck "$files_to_check" "$INPUT_CPPCHECK_ARGS" --output-file=cppcheck.txt || true - debug_print "Running run-clang-tidy-15 $INPUT_CLANG_TIDY_ARGS $files_to_check >>clang_tidy.txt 2>&1" - eval run-clang-tidy-15 "$INPUT_CLANG_TIDY_ARGS" "$files_to_check" >clang_tidy.txt 2>&1 || true + debug_print "Running run-clang-tidy-16 $INPUT_CLANG_TIDY_ARGS $files_to_check >>clang_tidy.txt 2>&1" + eval run-clang-tidy-16 "$INPUT_CLANG_TIDY_ARGS" "$files_to_check" >clang_tidy.txt 2>&1 || true fi python3 /run_static_analysis.py -cc cppcheck.txt -ct clang_tidy.txt -o "$print_to_console" -fk "$use_extra_directory"