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
|
|
|
|
|
|
|
|
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:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- 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
|