1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-13 13:59:40 +00:00

Adding validate phase to the CI

Adds a validate phase to the CI which runs a linter. Also fixes
linter issues discovered during the initial run
This commit is contained in:
Michael Bolot
2022-10-14 15:21:17 -05:00
parent 7e4a51bda0
commit b73cc57b20
15 changed files with 128 additions and 37 deletions

12
scripts/validate.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
set -e
golangci-lint run
go mod tidy
go mod verify
unclean=$(git status --porcelain --untracked-files=no)
if [ -n "$unclean" ]; then
echo "Encountered dirty repo!";
echo "$unclean";
exit 1;
fi