lint.yml 761 B

12345678910111213141516171819202122232425262728293031323334
  1. name: Run linters
  2. on:
  3. workflow_dispatch:
  4. push:
  5. env:
  6. MAX_LINE_LENGTH: 110
  7. jobs:
  8. lint:
  9. runs-on: ubuntu-20.04
  10. steps:
  11. - uses: actions/checkout@v2
  12. with:
  13. submodules: true
  14. fetch-depth: 1
  15. - name: Set up Python
  16. uses: actions/setup-python@v1
  17. with:
  18. python-version: 3.9
  19. architecture: x64
  20. - name: Install flake8
  21. run: |
  22. pip install flake8
  23. - name: Lint with flake8
  24. run: |
  25. # one pass for show-stopper syntax errors or undefined names
  26. flake8 archivebox --count --show-source --statistics
  27. # one pass for small stylistic things
  28. flake8 archivebox --count --max-line-length="$MAX_LINE_LENGTH" --statistics