-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
63 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[formatting] | ||
indent_string = " " | ||
reorder_arrays = true | ||
reorder_keys = true | ||
|
||
[[rule]] | ||
include = ["**/Cargo.toml"] | ||
keys = ["package"] | ||
|
||
[rule.formatting] | ||
reorder_keys = false |
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,26 @@ | ||
# If you change anything in here, make sure to also adjust the lint CI job! | ||
lint: | ||
just ensure-command cargo-nextest | ||
cargo fmt --all -- --check | ||
taplo format --check | ||
cargo clippy --tests --workspace -- -D warnings | ||
|
||
format: | ||
just ensure-command taplo | ||
cargo fmt | ||
taplo format | ||
|
||
|
||
# Ensures that one or more required commands are installed | ||
ensure-command +command: | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
read -r -a commands <<< "{{ command }}" | ||
|
||
for cmd in "${commands[@]}"; do | ||
if ! command -v "$cmd" > /dev/null 2>&1 ; then | ||
printf "Couldn't find required executable '%s'\n" "$cmd" >&2 | ||
exit 1 | ||
fi | ||
done |
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