2023-04-06 19:43:44 +08:00
|
|
|
name: Static code analysis
|
|
|
|
|
2023-05-16 07:51:16 +08:00
|
|
|
on:
|
2023-04-06 19:43:44 +08:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2023-07-23 18:52:08 +08:00
|
|
|
paths-ignore:
|
|
|
|
- documentation/**
|
|
|
|
- '**/README.md'
|
|
|
|
- '**/README_zh.md'
|
2023-04-06 19:43:44 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
scancode_job:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Static code analysis
|
2023-07-11 08:09:08 +08:00
|
|
|
if: github.repository_owner == 'RT-Thread'
|
2023-04-06 19:43:44 +08:00
|
|
|
steps:
|
2023-12-26 23:42:58 +08:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-06 19:43:44 +08:00
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v3
|
|
|
|
with:
|
|
|
|
python-version: 3.8
|
|
|
|
|
|
|
|
- name: cppcheck
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get -qq install cppcheck
|
2023-05-16 07:51:16 +08:00
|
|
|
pip install click PyYaml
|
2023-04-06 19:43:44 +08:00
|
|
|
git remote -v
|
|
|
|
git fetch origin
|
|
|
|
cppcheck --version
|
|
|
|
ls
|
|
|
|
git branch -a
|
2023-05-16 07:51:16 +08:00
|
|
|
python tools/ci/cpp_check.py check
|