-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
23 lines (19 loc) · 1.03 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.DEFAULT_GOAL := help
# declares .PHONY which will run the make command even if a file of the same name exists
.PHONY: help
help: ## Help command
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
lint: ## Lint check
docker run --rm -v $(PWD):/src:Z \
--workdir=/src odinuge/yapf:latest yapf \
--style '{based_on_style: pep8, dedent_closing_brackets: true, coalesce_brackets: true}' \
--no-local-style --verbose --recursive --diff --parallel directus
format: ## Format code in place to conform to lint check
docker run --rm -v $(PWD):/src:Z \
--workdir=/src odinuge/yapf:latest yapf \
--style '{based_on_style: pep8, dedent_closing_brackets: true, coalesce_brackets: true}' \
--no-local-style --verbose --recursive --in-place --parallel directus
pyflakes: ## Pyflakes check for any unused variables/classes
docker run --rm -v $(PWD):/src:Z \
--workdir=/src python:3.8 \
/bin/bash -c "pip install --upgrade pyflakes && python -m pyflakes /src && echo 'pyflakes passed!'"