summaryrefslogtreecommitdiff
path: root/workhorse/_support/validate-formatting.sh
blob: 190f646f8df455ca5f4dc16d707e8e0a9e42310c (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh

IMPORT_RESULT=$(goimports -e -local "gitlab.com/gitlab-org/gitlab-workhorse" -l "$@")

if [ -n "${IMPORT_RESULT}" ]; then
  echo >&2 "Formatting or imports need fixing: 'make fmt'"
  echo "${IMPORT_RESULT}"
  exit 1
fi