Skip to content

Commit

Permalink
chore: flakebox install
Browse files Browse the repository at this point in the history
  • Loading branch information
thesimplekid committed Aug 29, 2024
1 parent cc5efd9 commit e2041d3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .config/flakebox/id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9501c5c269226a4ea1bca7043d0b0cbe88e451514e3d43c089f74880a8a482980b414fb9d8f933589b2a1598f79fbc5646cca86da35e49ec694f6070a7ff53e5
e760eb996cb4d04ca4d503ecff1950521bf674ec1ddf8f8a7dc156ab5104fe11a67317fa5efcf97478fd58e0a62ac49800c14052ba95519f6e60e98e4f7a763b
5 changes: 5 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
group_imports = "StdExternalCrate"
wrap_comments = true
format_code_in_doc_comments = true
imports_granularity = "Module"
edition = "2021"
7 changes: 3 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# THIS FILE IS AUTOGENERATED FROM FLAKEBOX CONFIGURATION
import "./misc/justfile.custom.just"

alias b := build
alias c := check
Expand All @@ -10,6 +9,7 @@ alias t := test
default:
@just --list


# run `cargo build` on everything
build *ARGS="--workspace --all-targets":
#!/usr/bin/env bash
Expand All @@ -31,13 +31,12 @@ check *ARGS="--workspace --all-targets":

# run all checks recommended before opening a PR
final-check: lint clippy check-wasm
final-check: lint clippy
#!/usr/bin/env bash
set -euo pipefail
if [ ! -f Cargo.toml ]; then
cd {{invocation_directory()}}
fi
cargo test --doc
just test

Expand All @@ -49,7 +48,7 @@ format:
cd {{invocation_directory()}}
fi
cargo fmt --all
nixpkgs-fmt $(echo **.nix)
nixpkgs-fmt $(git ls-files | grep "\.nix$")

# run lints (git pre-commit hook)
Expand Down
2 changes: 1 addition & 1 deletion misc/git-hooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ MESSAGE="$(
MESSAGE="${MESSAGE#fixup! }"
if ! convco check --from-stdin <<<"$MESSAGE" ; then
>&2 echo "Please follow conventional commits(https://www.conventionalcommits.org)"
>&2 echo "Use git recommit <args> to fix your commit"
>&2 echo "Use git commit <args> to fix your commit"
exit 1
fi
2 changes: 1 addition & 1 deletion misc/git-hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function check_cargo_lock() {
set -euo pipefail

# https://users.rust-lang.org/t/check-if-the-cargo-lock-is-up-to-date-without-building-anything/91048/5
flakebox-in-each-cargo-workspace cargo update --workspace --locked
flakebox-in-each-cargo-workspace cargo update --workspace --locked |& while read -r note ; do echo "$note (cargo)"; done

}
export -f check_cargo_lock
Expand Down

0 comments on commit e2041d3

Please sign in to comment.