Files
postmarketos-mkinitfs/.gitlab-ci/check_linting.sh
2021-09-04 22:32:11 -07:00

14 lines
232 B
Bash
Executable File

#!/bin/sh
echo "### Running gofmt..."
files="$(gofmt -l .)"
if [ ! -z "$files" ]; then
# run gofmt to print out the diff of what needs to be changed
gofmt -d -e .
exit 1
fi
echo "### Running staticcheck..."
staticcheck ./...