2020-11-28 05:44:37 -05:00
|
|
|
name: Lint
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
2020-11-28 05:32:38 -05:00
|
|
|
|
|
|
|
env:
|
|
|
|
MAX_LINE_LENGTH: 110
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
2020-11-28 05:48:45 -05:00
|
|
|
submodules: true
|
2020-11-28 05:32:38 -05:00
|
|
|
fetch-depth: 1
|
|
|
|
|
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
2020-11-28 05:44:37 -05:00
|
|
|
python-version: 3.9
|
2020-11-28 05:32:38 -05:00
|
|
|
architecture: x64
|
|
|
|
|
|
|
|
- name: Install flake8
|
|
|
|
run: |
|
|
|
|
pip install flake8
|
|
|
|
|
|
|
|
- name: Lint with flake8
|
|
|
|
run: |
|
|
|
|
# one pass for show-stopper syntax errors or undefined names
|
|
|
|
flake8 archivebox --count --show-source --statistics
|
|
|
|
# one pass for small stylistic things
|
|
|
|
flake8 archivebox --count --max-line-length="$MAX_LINE_LENGTH" --statistics
|