-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pin rust, add justfile, update lints (#13)
- Loading branch information
Showing
8 changed files
with
137 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Fail on early and on unset variables in non-shebang recipes | ||
set shell := ["bash", "-euo", "pipefail", "-c"] | ||
# Allow usage of bash methods to handle multiple arguments and work around quoting issues | ||
set positional-arguments | ||
set quiet | ||
|
||
@default: fmt lint test | ||
|
||
rust_version := `sed -nr 's/channel = "(.*)"/\1/p' rust-toolchain.toml` | ||
rust_nightly_version := `sed -nr 's/channel = "(.*)"/\1/p' rust-toolchain-nightly.toml` | ||
|
||
rust-version: | ||
echo '{{rust_version}}' | ||
|
||
rust-nightly-version: | ||
echo '{{rust_nightly_version}}' | ||
|
||
test: | ||
cargo test --workspace --all-targets --all-features | ||
cargo test --workspace --doc | ||
|
||
lint strict="": | ||
cargo '+{{rust_nightly_version}}' fmt -- --check | ||
cargo clippy \ | ||
--workspace \ | ||
--tests \ | ||
--benches \ | ||
--all-targets \ | ||
--all-features \ | ||
--quiet \ | ||
-- {{ if strict != "" { "-D warnings" } else { "" } }} | ||
cargo doc --all --no-deps --document-private-items --all-features --quiet | ||
|
||
fmt: | ||
cargo '+{{rust_nightly_version}}' fmt | ||
|
||
udeps: | ||
cargo '+{{rust_nightly_version}}' udeps | ||
|
||
install-nightly: | ||
rustup toolchain install '{{rust_nightly_version}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[toolchain] | ||
channel = "nightly-2024-09-06" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[toolchain] | ||
channel = "1.81.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
imports_granularity = "Item" | ||
wrap_comments = true | ||
format_code_in_doc_comments = true | ||
normalize_comments = true | ||
normalize_doc_attributes = true | ||
group_imports = "StdExternalCrate" | ||
use_field_init_shorthand = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters