Makefile: use style command for formatting; style_check for checking

pull/25/head
Tomas Susanka 5 years ago
parent 37e50853f7
commit a15d4a81d5

@ -53,7 +53,7 @@ before_script:
- test "$GOAL" != "stm32" || export PATH=$PWD/$TOOLCHAIN_LONGVER/bin:$PATH
script:
- test "$GOAL" != "src" || pipenv run make style
- test "$GOAL" != "src" || pipenv run make style_check
- test "$GOAL" != "src" || pipenv run make templates_check
- test "$GOAL" != "stm32" || pipenv run make build_cross

@ -73,15 +73,13 @@ pylint: ## run pylint on application sources and tests
## style commands:
style: ## run code style check on application sources and tests
style_check: ## run code style check on application sources and tests
flake8 $(shell find src -name *.py)
isort --check-only $(shell find src -name *.py ! -path 'src/trezor/messages/*')
black --check $(shell find src -name *.py ! -path 'src/trezor/messages/*')
isort:
style:
isort $(shell find src -name *.py ! -path 'src/trezor/messages/*')
black:
black $(shell find src -name *.py ! -path 'src/trezor/messages/*')
cstyle: ## run code style check on low-level C code

@ -13,7 +13,7 @@ then
exit 1
fi
if ! make style &> /dev/null
if ! make style_check &> /dev/null
then
echo >&2 "Style invalid, run style make commands. Not pushing."
exit 2

Loading…
Cancel
Save