Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (43 loc) · 1.69 KB
/
Copy pathMakefile
File metadata and controls
58 lines (43 loc) · 1.69 KB
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
56
57
58
SHELL := /bin/bash
.PHONY: accept-lint-corpus check check-ci check-docs-skill check-rust develop-native release-rehearsal skills test test-e2e test-integration test-rust test-unit verify
check:
uv run ruff format .
uv run ruff check --fix .
uv run ty check src tests
@if command -v cargo >/dev/null; then uv run fensu check; else uv run fensu check --target python; fi
@command -v cargo >/dev/null && $(MAKE) --no-print-directory check-rust || true
check-ci:
uv run ruff format --check .
uv run ruff check .
uv run ty check src tests
uv run fensu check
$(MAKE) --no-print-directory check-docs-skill
$(MAKE) --no-print-directory check-rust
check-docs-skill:
uv run python -m scripts.check_docs_skill
# Rewrites the lint corpus's accepted findings from the current engine; read and commit the diff.
accept-lint-corpus:
SQLCLEAN_ACCEPT_LINT_CORPUS=1 cargo test -p sqlclean-lint --lib --quiet lint_corpus
release-rehearsal:
bash .github/scripts/simulate_release.sh
skills:
uv run python -m scripts.generate_docs_skill
check-rust:
cargo fmt --check
@# The Rules read trees only: no crate they reach may tokenize or parse SQL.
@if cargo tree -p sqlclean-rules -e normal --prefix none | grep -E '^sqlquack-(tokenize|parse|syntax-)'; then \
echo "sqlclean-rules must not reach a tokenizer or parser" >&2; exit 1; fi
cargo clippy --all-targets --quiet -- -D warnings
develop-native:
uv sync --all-groups --reinstall-package sqlclean-cli
test: test-rust
uv run pytest tests -q -n auto
test-rust:
cargo test --all --quiet
test-unit:
uv run pytest tests/unit -q -n auto
test-integration:
uv run pytest tests/integration -q -n auto
test-e2e:
uv run pytest tests/e2e -q -n auto
verify: check-ci test