blender-studio/test.sh
Anna Sirota 4e50ee2208 Add flake8 and flake8-docstrings (PEP8 and PEP 257) checkers as pre-commit hooks
Blender Studio's pre-commit hook already has auto-formatting setup with `black`, however `black` doesn't check PEP8 and PEP257 compliance.
To save time on review comments aimed at code style, it would make sense to automate PEP8/PEP257 checks as well.

`flake8` doesn't yet support [[ https://gitlab.com/pycqa/flake8/-/issues/428 | pyproject.toml ]] , so `setup.cfg` had to be added.

To avoid breaking attribution and meaningful commit history, none of the existing violations are fixed in this change, pre-commit hook will only check code included into future commits (same as `black`).

Reviewed By: fsiddi

Differential Revision: https://developer.blender.org/D9110
2020-10-05 15:24:23 +02:00

10 lines
175 B
Bash
Executable File

#!/usr/bin/env sh
set -ux
env PYTHONPATH=. poetry run mypy .
poetry run black --check .
poetry run flake8 .
./manage.sh test
yarn run eslint .
yarn run stylelint ./**/*.scss