-
-
Notifications
You must be signed in to change notification settings - Fork 140
37 lines (30 loc) · 1.05 KB
/
Copy pathlint-flake8.yml
File metadata and controls
37 lines (30 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Static Analysis
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
permissions:
contents: read
jobs:
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8==7.3.0
- name: Run flake8 static analysis
# E9 (syntax errors), all of pyflakes (F: undefined names, unused imports,
# unused locals, %-format errors, f-strings without placeholders, ...), plus
# high-value correctness rules: W605 invalid escape sequence, E711-E714
# None/True/membership comparisons, E722 bare except, E401 multiple imports
# on one line. Bulk formatting rules (E501 line length, W291/W293 trailing
# whitespace, E3xx blank lines) are intentionally left out.
run: |
flake8 . --count --select=E9,F,W605,E711,E712,E713,E714,E722,E401 --show-source --statistics