debian-mirror-gitlab/workhorse/_support/validate-formatting.sh

10 lines
230 B
Bash
Raw Normal View History

2021-02-22 17:27:13 +05:30
#!/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