debian-mirror-gitlab/workhorse/_support/validate-formatting.sh
2021-02-22 17:27:13 +05:30

9 lines
230 B
Bash
Executable file

#!/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