Add code linting for scripts to CI

This commit is contained in:
Dale Whinham
2022-03-31 15:40:58 +01:00
parent 26d80db9ba
commit 6159305a86
3 changed files with 32 additions and 0 deletions

3
.flake8 Normal file
View File

@@ -0,0 +1,3 @@
[flake8]
max-line-length = 88
extend-ignore = E203

View File

@@ -4,8 +4,35 @@ on: [push, pull_request]
env:
toolchain-version: 10.3-2021.07
python-version: 3.6
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ env.python-version }}
- uses: psf/black@stable
with:
options: --check --diff --experimental-string-processing
src: scripts
- uses: isort/isort-action@master
with:
sortPaths: scripts
- uses: py-actions/flake8@v2
with:
path: scripts
- uses: ludeeus/action-shellcheck@master
with:
scandir: scripts
build:
runs-on: ubuntu-latest
name: build-${{ matrix.board }}

2
.isort.cfg Normal file
View File

@@ -0,0 +1,2 @@
[settings]
profile = black