1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 11:09:01 +00:00

Makefile: use style command for formatting; style_check for checking

This commit is contained in:
Tomas Susanka 2019-01-17 14:51:16 +01:00
parent 37e50853f7
commit a15d4a81d5
3 changed files with 4 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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