summaryrefslogtreecommitdiff
path: root/.github/workflows/static_code_analysis.yml
diff options
context:
space:
mode:
authorSupper Thomas <[email protected]>2024-09-04 06:51:45 +0800
committerMeco Man <[email protected]>2024-09-03 20:50:31 -0400
commit3174fcd77b8826ebd057c489e8b843736c1c60eb (patch)
tree3ac18345acdaaa6bb3ad9f758738b223e7483d9c /.github/workflows/static_code_analysis.yml
parent175a2ff954a8ad6ce9a1739c8338b665b6abef80 (diff)
[action] update cppcheck version
Diffstat (limited to '.github/workflows/static_code_analysis.yml')
-rw-r--r--.github/workflows/static_code_analysis.yml27
1 files changed, 24 insertions, 3 deletions
diff --git a/.github/workflows/static_code_analysis.yml b/.github/workflows/static_code_analysis.yml
index 025e458517..6af945a267 100644
--- a/.github/workflows/static_code_analysis.yml
+++ b/.github/workflows/static_code_analysis.yml
@@ -1,6 +1,16 @@
+#
+# Copyright (c) 2006-2024, RT-Thread Development Team
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Change Logs:
+# Date Author Notes
+# 2024-09-04 Supperthomas add cppcheck use the latest release version
+#
name: Static code analysis
on:
+ workflow_dispatch:
pull_request:
branches:
- master
@@ -25,11 +35,22 @@ jobs:
shell: bash
run: |
sudo apt-get update
- sudo apt-get -qq install cppcheck
pip install click PyYaml
+ git clone https://github.com/danmar/cppcheck.git
+ cd cppcheck
+ git fetch --tags
+ latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
+ echo "Latest release tag: $latest_tag"
+ git checkout $latest_tag
+ mkdir build
+ cd build
+ cmake ..
+ make
+ sudo make install
+ cppcheck --version
+ cd ../../
git remote -v
git fetch origin
- cppcheck --version
ls
git branch -a
- python tools/ci/cpp_check.py check
+ python tools/ci/cpp_check.py check \ No newline at end of file