File: chkfmt

package info (click to toggle)
zfind 0.4.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 320 kB
  • sloc: sh: 145; makefile: 5
file content (13 lines) | stat: -rwxr-xr-x 199 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/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