mirror of
https://github.com/aljazceru/cdk.git
synced 2026-01-26 00:05:57 +01:00
refactor: cdk MSRV
This commit is contained in:
68
justfile
68
justfile
@@ -1,16 +1,13 @@
|
||||
# THIS FILE IS AUTOGENERATED FROM FLAKEBOX CONFIGURATION
|
||||
|
||||
import "./misc/justfile.custom.just"
|
||||
|
||||
alias b := build
|
||||
alias c := check
|
||||
alias t := test
|
||||
|
||||
|
||||
[private]
|
||||
default:
|
||||
@just --list
|
||||
|
||||
final-check: format clippy test
|
||||
|
||||
# run `cargo build` on everything
|
||||
build *ARGS="--workspace --all-targets":
|
||||
@@ -21,7 +18,6 @@ build *ARGS="--workspace --all-targets":
|
||||
fi
|
||||
cargo build {{ARGS}}
|
||||
|
||||
|
||||
# run `cargo check` on everything
|
||||
check *ARGS="--workspace --all-targets":
|
||||
#!/usr/bin/env bash
|
||||
@@ -31,17 +27,6 @@ check *ARGS="--workspace --all-targets":
|
||||
fi
|
||||
cargo check {{ARGS}}
|
||||
|
||||
|
||||
# run all checks recommended before opening a PR
|
||||
final-check: lint clippy
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
if [ ! -f Cargo.toml ]; then
|
||||
cd {{invocation_directory()}}
|
||||
fi
|
||||
just test
|
||||
|
||||
|
||||
# run code formatters
|
||||
format:
|
||||
#!/usr/bin/env bash
|
||||
@@ -50,15 +35,7 @@ format:
|
||||
cd {{invocation_directory()}}
|
||||
fi
|
||||
cargo fmt --all
|
||||
nixpkgs-fmt $(git ls-files | grep "\.nix$")
|
||||
|
||||
|
||||
# run lints (git pre-commit hook)
|
||||
lint:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
env NO_STASH=true $(git rev-parse --git-common-dir)/hooks/pre-commit
|
||||
|
||||
nixpkgs-fmt $(echo **.nix)
|
||||
|
||||
# run tests
|
||||
test: build
|
||||
@@ -69,52 +46,15 @@ test: build
|
||||
fi
|
||||
cargo test
|
||||
|
||||
|
||||
# run and restart on changes
|
||||
watch *ARGS="-x run":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
if [ ! -f Cargo.toml ]; then
|
||||
cd {{invocation_directory()}}
|
||||
fi
|
||||
env RUST_LOG=${RUST_LOG:-debug} cargo watch {{ARGS}}
|
||||
|
||||
|
||||
# run `cargo clippy` on everything
|
||||
clippy *ARGS="--locked --offline --workspace --all-targets":
|
||||
cargo clippy {{ARGS}} -- --deny warnings --allow deprecated
|
||||
cargo clippy {{ARGS}}
|
||||
|
||||
# run `cargo clippy --fix` on everything
|
||||
clippy-fix *ARGS="--locked --offline --workspace --all-targets":
|
||||
cargo clippy {{ARGS}} --fix
|
||||
|
||||
|
||||
# run `semgrep`
|
||||
semgrep:
|
||||
env SEMGREP_ENABLE_VERSION_CHECK=0 \
|
||||
semgrep --error --no-rewrite-rule-ids --config .config/semgrep.yaml
|
||||
|
||||
|
||||
# check typos
|
||||
[no-exit-message]
|
||||
typos *PARAMS:
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
export FLAKEBOX_GIT_LS
|
||||
FLAKEBOX_GIT_LS="$(git ls-files)"
|
||||
export FLAKEBOX_GIT_LS_TEXT
|
||||
FLAKEBOX_GIT_LS_TEXT="$(echo "$FLAKEBOX_GIT_LS" | grep -v -E "^db/|\.(png|ods|jpg|jpeg|woff2|keystore|wasm|ttf|jar|ico)\$")"
|
||||
|
||||
|
||||
if ! echo "$FLAKEBOX_GIT_LS_TEXT" | typos {{PARAMS}} --file-list - --force-exclude ; then
|
||||
>&2 echo "Typos found: Valid new words can be added to '.typos.toml'"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# fix all typos
|
||||
[no-exit-message]
|
||||
typos-fix-all:
|
||||
typos-fix:
|
||||
just typos -w
|
||||
|
||||
# THIS FILE IS AUTOGENERATED FROM FLAKEBOX CONFIGURATION
|
||||
|
||||
Reference in New Issue
Block a user