2021-11-01 13:29:07 +00:00
|
|
|
stages:
|
|
|
|
- lint
|
|
|
|
|
2021-11-01 13:36:43 +00:00
|
|
|
image: python:latest
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- pip install pre-commit
|
|
|
|
- pre-commit install
|
|
|
|
|
2021-11-01 13:42:38 +00:00
|
|
|
basic hooks:
|
|
|
|
stage: lint
|
|
|
|
script:
|
|
|
|
- pre-commit run trailing-whitespace --all-files
|
|
|
|
- pre-commit run end-of-file-fixer --all-files
|
|
|
|
- pre-commit run check-yaml --all-files
|
|
|
|
- pre-commit run check-added-large-files --all-files
|
|
|
|
|
|
|
|
mypy:
|
|
|
|
stage: lint
|
|
|
|
script:
|
|
|
|
- pre-commit run mypy --all-files
|
|
|
|
|
|
|
|
isort:
|
|
|
|
stage: lint
|
|
|
|
script:
|
|
|
|
- pre-commit run isort --all-files
|
|
|
|
|
|
|
|
black:
|
|
|
|
stage: lint
|
|
|
|
script:
|
|
|
|
- pre-commit run black --all-files
|
|
|
|
|
2021-11-01 13:29:07 +00:00
|
|
|
flake8:
|
|
|
|
stage: lint
|
|
|
|
script:
|
|
|
|
- pre-commit run flake8 --all-files
|
2021-11-01 13:54:22 +00:00
|
|
|
|
|
|
|
bandit:
|
|
|
|
stage: lint
|
|
|
|
script:
|
|
|
|
- pre-commit run bandit --all-files
|