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