difftreelog
ci add pre-commit hook
in: master
5 files changed
.envrcdiffbeforeafterboth--- a/.envrc
+++ b/.envrc
@@ -1 +1,8 @@
+RED='\033[0;31m'
+RESET='\033[0m'
+
use flake
+
+if ! diff .github/hooks/pre-commit .git/hooks/pre-commit >/dev/null; then
+echo -e "${RED}Hooks are updated, read .github/hooks/pre-commit, and then install it with cp .github/hooks/pre-commit .git/hooks/pre-commit${RESET}"
+fi
.github/hooks/pre-commitdiffbeforeafterboth--- /dev/null
+++ b/.github/hooks/pre-commit
@@ -0,0 +1 @@
+cargo xtask lint
flake.nixdiffbeforeafterboth--- a/flake.nix
+++ b/flake.nix
@@ -116,7 +116,7 @@
};
};
devShells.default = craneLib.devShell {
- nativeBuildInputs = with pkgs; [
+ packages = with pkgs; [
alejandra
cargo-edit
cargo-asm
@@ -126,6 +126,9 @@
lld
hyperfine
graphviz
+ ] ++ lib.optionals (!stdenv.isDarwin) [
+ valgrind
+ kcachegrind
];
};
}
xtask/Cargo.tomldiffbeforeafterboth--- a/xtask/Cargo.toml
+++ b/xtask/Cargo.toml
@@ -15,3 +15,4 @@
quote.workspace = true
ungrammar.workspace = true
xshell.workspace = true
+clap = {workspace = true, features = ["derive"]}
xtask/src/main.rsdiffbeforeafterboth