ci: add staticcheck to linting

See #6
This commit is contained in:
Clayton Craft
2021-09-04 18:13:31 -07:00
parent 8128877bcb
commit 7e3268a9c8
3 changed files with 17 additions and 13 deletions

13
.gitlab-ci/check_linting.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/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 ./...