wzrd

An ICCCM & EWMH compliant X11 reparenting, dynamic window manager, written in Rust
git clone git://git.deurzen.net/wzrd
Log | Files | Refs | LICENSE

pre-commit (405B)


      1 #!/bin/sh
      2 
      3 remote="$1"
      4 url="$2"
      5 
      6 for file in $(git diff --name-only); do
      7     if [[ "$file" == *.rs ]]; then
      8         if ! rustfmt +nightly --unstable-features --quiet --check --error-on-unformatted $file 2>&1 >/dev/null; then
      9             echo -e "${RED}Format check failed${NC}, cannot continue."
     10             echo -e "Please format using \`make format\`."
     11             exit 1
     12         fi
     13     fi
     14 done
     15 
     16 exit 0