-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
150 lines (117 loc) · 2.97 KB
/
Justfile
File metadata and controls
150 lines (117 loc) · 2.97 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
set shell := ['uv', 'run', '--frozen', 'bash', '-euxo', 'pipefail', '-c']
set unstable
set positional-arguments
project := "jsonlt"
package := "jsonlt"
pnpm := "pnpm exec"
# Run security audit
audit:
cargo deny check
cargo audit
# Clean build artifacts
clean:
#!/usr/bin/env bash
cargo clean
rm -rf node_modules
rm -rf .vale
# List available recipes
default:
@just --list
# Generate documentation
doc *args:
cargo doc --all-features --no-deps "$@"
# Run benchmarks
benchmark *args:
cargo bench "$@"
# Build the library
build *args:
cargo build "$@"
# Build for WASM target
build-wasm *args:
cargo build --target wasm32-unknown-unknown --features wasm "$@"
# Format code
format:
codespell -w
cargo fmt
{{pnpm}} biome format --write .
# Fix code issues
fix:
cargo fmt
cargo clippy --fix --allow-dirty --allow-staged
{{pnpm}} biome format --write .
{{pnpm}} biome check --write .
# Fix code issues including unsafe fixes
fix-unsafe:
cargo fmt
cargo clippy --fix --allow-dirty --allow-staged
{{pnpm}} biome check --write --unsafe .
# Run all linters
lint: lint-rust lint-spelling lint-markdown lint-web
yamllint --strict .
# Lint Markdown files
lint-markdown:
{{pnpm}} markdownlint-cli2 "**/*.md"
# Lint prose in Markdown files
lint-prose:
vale CODE_OF_CONDUCT.md CONTRIBUTING.md README.md SECURITY.md
# Lint Rust code
lint-rust:
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
# Check spelling
lint-spelling:
codespell
# Lint web files (CSS, HTML, JS, JSON)
lint-web:
{{pnpm}} biome check .
# Install all dependencies (Python + Node.js + Rust)
install: install-node install-python install-rust
# Install only Node.js dependencies
install-node:
#!/usr/bin/env bash
pnpm install --frozen-lockfile
# Install pre-commit hooks
install-prek:
prek install
# Install only Python dependencies (for linting tools)
install-python:
#!/usr/bin/env bash
uv sync --frozen
# Install Rust toolchain and dependencies
install-rust:
#!/usr/bin/env bash
rustup show
cargo fetch
# Run pre-commit hooks on changed files
prek:
prek
# Run pre-commit hooks on all files
prek-all:
prek run --all-files
# Generate SBOM for current environment
sbom output="sbom.cdx.json":
uv run --isolated --group release cyclonedx-py environment --of json -o {{output}}
# Run tests (excludes slow tests by default)
test *args:
cargo test "$@"
# Run all tests including ignored
test-all *args:
cargo test --all-features -- --include-ignored "$@"
# Run conformance tests
test-conformance *args:
cargo test --test conformance "$@"
# Run tests with coverage
test-coverage *args:
cargo llvm-cov --all-features --lcov --output-path lcov.info "$@"
# Run integration tests
test-integration *args:
cargo test --test '*' "$@"
# Run property-based tests
test-property *args:
cargo test proptest "$@"
# Run WASM tests
test-wasm *args:
wasm-pack test --headless --chrome --features wasm "$@"
# Sync Vale styles and dictionaries
vale-sync:
vale sync