summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authordejavudwh <[email protected]>2023-05-16 07:51:16 +0800
committerGitHub <[email protected]>2023-05-16 07:51:16 +0800
commitb1584e9fa9b66b250854b1836b79af9ba29400e6 (patch)
tree1c78f8d7adc92b37467c66b953beb0e48225f215 /.github/workflows
parent01d1bbe40d7932e042e9dfb1c9eb41b01abc1b3f (diff)
[CI] Added feature to filter out files to file_check.py that do not require cppcheck (#7499)
Co-authored-by: supperthomas <[email protected]>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/static_code_analysis.yml12
1 files changed, 3 insertions, 9 deletions
diff --git a/.github/workflows/static_code_analysis.yml b/.github/workflows/static_code_analysis.yml
index 37d9a7b2cb..397e04ef1d 100644
--- a/.github/workflows/static_code_analysis.yml
+++ b/.github/workflows/static_code_analysis.yml
@@ -1,6 +1,6 @@
name: Static code analysis
-on:
+on:
pull_request:
branches:
- master
@@ -21,16 +21,10 @@ jobs:
run: |
sudo apt-get update
sudo apt-get -qq install cppcheck
+ pip install click PyYaml
git remote -v
git fetch origin
cppcheck --version
ls
git branch -a
- changed_files=$(git diff --name-only HEAD origin/master | grep -E '\.(c|cpp|cc|cxx)$' || true)
- if [ -n "$changed_files" ];then
- cppcheck --enable=warning,performance,portability --inline-suppr --error-exitcode=1 --force $changed_files
- err=$?
- if [ $err -ne 0 ]; then
- echo "CPPCHECK REPORT, PLEASE CHECK THE WARNING !!!!!!!!!"
- fi
- fi
+ python tools/ci/cpp_check.py check