summaryrefslogtreecommitdiff
path: root/.github/workflows/static_code_analysis.yml
blob: 025e458517db36f62692e9523ae53995da6f3509 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Static code analysis

on:
  pull_request:
    branches:
      - master
    paths-ignore:
      - documentation/**
      - '**/README.md'
      - '**/README_zh.md'

jobs:
  scancode_job:
    runs-on: ubuntu-latest
    name: Static code analysis
    if: github.repository_owner == 'RT-Thread'
    steps:
      - uses: actions/checkout@v4
      - 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
          pip install click PyYaml
          git remote -v
          git fetch origin
          cppcheck --version
          ls
          git branch -a
          python tools/ci/cpp_check.py check