-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
51 lines (40 loc) · 1.32 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
#!/usr/bin/env just --justfile
# Setup the development environment
setup-dev:
@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 environment installed successfully!
# Run checks
check: spellcheck fmt clippy test
@echo Checks were successful!
# Remove generated artifacts
clean:
@cargo clean
@echo Done!
# Build the project
build:
@cargo build
@echo Project successfully built!
# Run the tests
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="":
@cargo +nightly fmt --all -- {{ARGS}}
@echo Codebase formatted successfully!
# Spellcheck the codebase
spellcheck +ARGS="--skip target*":
@codespell --write-changes --builtin clear,rare,informal,code -I .codespellignore {{ARGS}}
@echo Spellings look good!