-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
46 lines (36 loc) · 1.07 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.PHONY: install
install: ## Install all dependencies.
@poetry install --with test --no-root
.PHONY: test ## Run all tests.
test: test/integration
.PHONY: test/integration
test/integration:
@poetry run pytest test/integration/test_code_reviews.py
.PHONY: check
check: check/types check/spell check/lint ## Run all checks.
.PHONY: check/types
check/types:
@poetry run pyright $(shell find docs -type f -name "*.py" -path "*/code_reviews/*")
.PHONY: check/spell
check/spell:
@poetry run typos
.PHONY: check/lint
check/lint:
@poetry run ruff check
.PHONY: check/format
check/format:
@poetry run ruff format --check
.PHONY: docs
docs: ## Build documentation.
@poetry run mkdocs build
.PHONY: format
format: ## Format project.
@poetry run ruff format
.DEFAULT_GOAL := help
.PHONY: help
help: ## Print Makefile help text.
@# Matches targets with a comment in the format <target>: ## <comment>
@# then formats help output using these values.
@grep -E '^[a-zA-Z_\/-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; \
{printf "\033[36m%-12s\033[0m%s\n", $$1, $$2}'