format.yaml 826 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: PR Lint Format
  2. on:
  3. pull_request:
  4. paths:
  5. - 'drivers/**'
  6. - 'lib/arm_atsam/**'
  7. - 'lib/lib8tion/**'
  8. - 'lib/python/**'
  9. - 'platforms/**'
  10. - 'quantum/**'
  11. - 'tests/**'
  12. - 'tmk_core/**'
  13. jobs:
  14. lint:
  15. runs-on: ubuntu-latest
  16. container: qmkfm/qmk_cli
  17. steps:
  18. - uses: rlespinasse/github-slug-action@v3.x
  19. - uses: actions/checkout@v2
  20. with:
  21. fetch-depth: 0
  22. - uses: trilom/file-changes-action@v1.2.4
  23. id: file_changes
  24. with:
  25. output: ' '
  26. fileOutput: ' '
  27. - name: Run qmk format-c and qmk format-python
  28. shell: 'bash {0}'
  29. run: |
  30. qmk format-c --core-only -n $(< ~/files.txt)
  31. format_c_exit=$?
  32. qmk format-python -n
  33. format_python_exit=$?
  34. exit $((format_c_exit + format_python_exit))