forked from fede1024/kafka-view
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (30 loc) · 788 Bytes
/
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
VENV := precommit_venv
HOOKS := .git/hooks/pre-commit
# PRE-COMMIT HOOKS
$(VENV): .requirements-precommit.txt
virtualenv -p python3 $(VENV)
$(VENV)/bin/pip install -r .requirements-precommit.txt
.PHONY: env
env: $(VENV)
.PHONY: clean-env
clean-env:
rm -rf $(VENV)
$(HOOKS): $(VENV) .pre-commit-config.yaml
$(VENV)/bin/pre-commit install -f --install-hooks
cargo fmt --help > /dev/null || rustup component add rustfmt
cargo clippy --help > /dev/null || rustup component add clippy
.PHONY: install-hooks
install-hooks: $(HOOKS)
.PHONY: clean-hooks
clean-hooks:
rm -rf $(HOOKS)
# LINTING
.PHONY: lint
lint:
cargo fmt
.PHONY: clean-lint
clean-lint:
find . -type f -name *.rs.bk -delete
.PHONY: clippy
clippy:
cargo clippy --all-features -- -A clippy::match_wild_err_arm