I have a codebase that is not in compliance with flake8. The CI/CD pipeline uses GitHub/GitHub actions. I would like to start adding python flake8 (to check for complexity, errors and code smells) progressively. How can I accomplish this task?
Asked
Active
Viewed 1,264 times
1 Answers
0
This should get you started: https://github.com/py-actions/flake8
Or if you prefer to do it more manually you can use this:
name: Python
on:
push:
branches: [main]
pull_request:
jobs:
flake8:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4.1.0
with:
python-version: 3
- name: Install flake8
run: pip --disable-pip-version-check install flake8
- name: Lint with flake8
run: flake8 --count
lukee
- 101
- 2