-
Notifications
You must be signed in to change notification settings - Fork 8
/
justfile
59 lines (43 loc) · 1.65 KB
/
justfile
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
#!/usr/bin/env just --justfile
# Setup development environment
setup:
@echo "=== Installing development dependencies ==="
sudo apt install libgtk-4-dev libadwaita-1-dev -y
@echo "=== Development dependencies installed! ==="
@echo "=== Installing development tools ==="
@echo "Installing nightly \`rustfmt\`"
@rustup toolchain install nightly --component rustfmt
@echo "Nightly \`rustfmt\` successfully installed!"
@echo "Installing \`pre-commit\`"
@pip install pre-commit
@pre-commit install
@echo "\`pre-commit\` hooks successfully installed!"
@echo "Installing \`codespell\`"
@pip install codespell
@echo "\`codespell\` successfully installed!"
@echo "=== Development tools installed! ==="
@meson build
@ninja -C build install
@echo "=== Development environment installed successfully! ==="
# Build the project
build +ARGS="":
@ninja -C build install {{ARGS}}
@echo "Successfully built the project!"
# Run checks
check: (spellcheck "") (fmt "--check") clippy test
@echo "Checks were successful!"
# Test the project
test +ARGS="":
@cargo test --all-features --workspace {{ARGS}}
# Lint the codebase
clippy +ARGS="":
@cargo clippy --all-targets --all-features --workspace -- --deny warnings --deny clippy::pedantic {{ARGS}}
@echo Lint successful!
# Format the codebase
fmt +ARGS="": spellcheck
@cargo +nightly fmt --all -- {{ARGS}}
@echo Codebase formatted successfully!
# Spellcheck the codebase
spellcheck +ARGS="--write-changes":
@codespell --builtin clear,rare,informal,code -I .codespellignore --skip target* "*.svg" data{{ARGS}}
@echo Spellings look good!