-
-
Notifications
You must be signed in to change notification settings - Fork 86
/
Makefile
55 lines (48 loc) · 1.19 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
47
48
49
50
51
52
53
54
55
.DEFAULT_GOAL := all
pysources = granian tests
.PHONY: build-dev
build-dev:
@rm -f granian/*.so
maturin develop --extras lint,test
.PHONY: format
format:
ruff check --fix $(pysources)
ruff format $(pysources)
cargo fmt
.PHONY: lint-python
lint-python:
ruff check $(pysources)
ruff format --check $(pysources)
.PHONY: lint-rust
lint-rust:
cargo fmt --version
cargo fmt --all -- --check
cargo clippy --version
cargo clippy --tests -- \
-D warnings \
-W clippy::pedantic \
-W clippy::dbg_macro \
-A clippy::cast-possible-truncation \
-A clippy::cast-sign-loss \
-A clippy::declare-interior-mutable-const \
-A clippy::inline-always \
-A clippy::match-bool \
-A clippy::match-same-arms \
-A clippy::module-name-repetitions \
-A clippy::needless-pass-by-value \
-A clippy::no-effect-underscore-binding \
-A clippy::similar-names \
-A clippy::single-match-else \
-A clippy::too-many-arguments \
-A clippy::too-many-lines \
-A clippy::type-complexity \
-A clippy::unused-self \
-A clippy::used_underscore_items \
-A clippy::wrong-self-convention
.PHONY: lint
lint: lint-python lint-rust
.PHONY: test
test:
pytest -v tests
.PHONY: all
all: format build-dev lint test