Skip to content

Commit

Permalink
Linter Test 23
Browse files Browse the repository at this point in the history
  • Loading branch information
onurulgen committed Feb 12, 2024
1 parent 292b4d6 commit c7b5003
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/code_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Input variables from Github action
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN")
PR_NUM = os.getenv("PR_NUMBER", "-1")
WORK_DIR = f'{os.getenv("GITHUB_WORKSPACE")}'
WORK_DIR = os.getenv("WORK_DIR", os.getenv("GITHUB_WORKSPACE"))
REPO_NAME = os.getenv("REPO")
TARGET_REPO_NAME = os.getenv("REPO", "")
SHA = os.getenv("GITHUB_SHA")
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ 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="--check-level=exhaustive --enable=warning --suppress=internalError"
cppcheck_params="--enable=warning --check-level=exhaustive --suppress=internalError --suppress=internalAstError"
cppcheck -j4 $cppcheck_params --project=build/compile_commands.json --output-file=$analysis_file
# Since cppcheck does not support OpenCL and CUDA, we need to check these files separately
find $(pwd)/reg-lib/cl/. -name "*.cl" -print0 | while IFS= read -r -d '' file; do cppcheck "$file" $cppcheck_params --language=c++ 2>> $analysis_file; done
find $(pwd)/reg-lib/cuda/. -name "*.cu" -print0 | while IFS= read -r -d '' file; do cppcheck "$file" $cppcheck_params --language=c++ 2>> $analysis_file; done
find reg-lib/cl/. -name "*.cl" -print0 | while IFS= read -r -d '' file; do cppcheck "$file" $cppcheck_params --language=c++ 2>> $analysis_file; done
find reg-lib/cuda/. -name "*.cu" -print0 | while IFS= read -r -d '' file; do cppcheck "$file" $cppcheck_params --language=c++ 2>> $analysis_file; done
cat $analysis_file
python3 ${{ github.workspace }}/.github/code_analysis.py -cc $analysis_file -o false -fk false
2 changes: 1 addition & 1 deletion niftyreg_build_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
445
446

0 comments on commit c7b5003

Please sign in to comment.