From 45df5d7ddcf4409163cc706e5586693c3dd5652c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Onur=20=C3=9Clgen?= Date: Mon, 12 Feb 2024 17:41:42 +0000 Subject: [PATCH] Linter Test 24 --- .github/code_analysis.py | 9 ++++----- .github/workflows/analysis.yml | 1 - niftyreg_build_version.txt | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/code_analysis.py b/.github/code_analysis.py index 65e056e8..728fa7bd 100644 --- a/.github/code_analysis.py +++ b/.github/code_analysis.py @@ -8,7 +8,7 @@ # Input variables from Github action GITHUB_TOKEN = os.getenv("GITHUB_TOKEN") PR_NUM = os.getenv("PR_NUMBER", "-1") -WORK_DIR = os.getenv("WORK_DIR", os.getenv("GITHUB_WORKSPACE")) +WORK_DIR = os.getenv("GITHUB_WORKSPACE") REPO_NAME = os.getenv("REPO") TARGET_REPO_NAME = os.getenv("REPO", "") SHA = os.getenv("GITHUB_SHA") @@ -207,10 +207,9 @@ def is_excluded_dir(line): if not exclude_dir: return False - excluded_dir = f"{WORK_DIR}/{exclude_dir}" - debug_print(f"{line} and {excluded_dir} with result {line.startswith(excluded_dir)}") + debug_print(f"{line} and {exclude_dir} with result {line.startswith(exclude_dir)}") - return line.startswith(excluded_dir) + return line.startswith(exclude_dir) def get_file_line_end(file_in, file_line_start_in): @@ -528,7 +527,7 @@ def read_files_and_parse_results(): common_ancestor = parser.parse_args().common feature_branch = parser.parse_args().head - line_prefix = f"{WORK_DIR}" + line_prefix = "" debug_print(f"cppcheck result: \n {cppcheck_content} \n" f"line_prefix: {line_prefix} \n") diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 843be2aa..818e22ff 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -49,7 +49,6 @@ jobs: PR_NUMBER: ${{ github.event.pull_request.number }} REPO: ${{ github.repository }} REPORT_PR_CHANGES_ONLY: false - WORK_DIR: "" run: | analysis_file="analysis.txt" cppcheck_params="--enable=warning --check-level=exhaustive --suppress=internalError --suppress=internalAstError" diff --git a/niftyreg_build_version.txt b/niftyreg_build_version.txt index 01878352..e9b7520b 100644 --- a/niftyreg_build_version.txt +++ b/niftyreg_build_version.txt @@ -1 +1 @@ -446 +447