2020-08-07 22:50:37 +02:00
|
|
|
|
|
|
|
# https://tech.davis-hansson.com/p/make/
|
|
|
|
SHELL := bash
|
|
|
|
.ONESHELL:
|
2020-08-09 14:43:39 +02:00
|
|
|
.SHELLFLAGS := -eux -o pipefail -c
|
2020-08-07 22:50:37 +02:00
|
|
|
.DELETE_ON_ERROR:
|
2020-08-09 14:43:39 +02:00
|
|
|
.SILENT:
|
2020-08-07 22:50:37 +02:00
|
|
|
.DEFAULT_GOAL := all
|
|
|
|
MAKEFLAGS += --warn-undefined-variables
|
|
|
|
MAKEFLAGS += --no-builtin-rules
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: lint test ## Run lint and test (default goal)
|
|
|
|
|
|
|
|
.PHONY: lint
|
|
|
|
lint: ## Lint all source code
|
2020-08-07 23:01:51 +02:00
|
|
|
poetry run yapf -q -r veml6070
|
|
|
|
poetry run pylint --ignore=snapshots veml6070 tests
|
2020-08-07 22:50:37 +02:00
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test: ## Run all tests
|
|
|
|
poetry run pytest
|
|
|
|
|
|
|
|
.PHONY: help
|
|
|
|
help: ## Print this help text
|
|
|
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
|