Skip to content

Commit

Permalink
feat: add fmt githook
Browse files Browse the repository at this point in the history
This is something that I always want to do
but I never started. So this is a good way to start.

Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
royalpinto007 authored and vincenzopalazzo committed Dec 30, 2023
1 parent 3310567 commit 41d3d49
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions contrib/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

FMTCMD="${CARGO_FMT_CMD:cargo fmt -- --check}"

# Redirect output to stderr.
exec 1>&2

unset RUST_LOG
set -e

# check everything else
$FMTCMD

0 comments on commit 41d3d49

Please sign in to comment.