static_code_analysis.yml 788 B

1234567891011121314151617181920212223242526272829303132333435
  1. name: Static code analysis
  2. on:
  3. pull_request:
  4. branches:
  5. - master
  6. paths-ignore:
  7. - documentation/**
  8. - '**/README.md'
  9. - '**/README_zh.md'
  10. jobs:
  11. scancode_job:
  12. runs-on: ubuntu-latest
  13. name: Static code analysis
  14. if: github.repository_owner == 'RT-Thread'
  15. steps:
  16. - uses: actions/checkout@v3
  17. - name: Set up Python
  18. uses: actions/setup-python@v3
  19. with:
  20. python-version: 3.8
  21. - name: cppcheck
  22. shell: bash
  23. run: |
  24. sudo apt-get update
  25. sudo apt-get -qq install cppcheck
  26. pip install click PyYaml
  27. git remote -v
  28. git fetch origin
  29. cppcheck --version
  30. ls
  31. git branch -a
  32. python tools/ci/cpp_check.py check