This repository has been archived on 2025-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
chkbit/scripts/chkfmt

14 lines
199 B
Plaintext
Raw Normal View History

2024-08-15 23:30:29 +02:00
#!/bin/bash
set -eE -o pipefail
script_dir=$(dirname "$(realpath "$0")")
cd $script_dir/..
res="$(gofmt -l . 2>&1)"
if [ -n "$res" ]; then
echo "gofmt check failed:"
echo "${res}"
exit 1
fi