2020-02-06 00:42:32 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
echo "Checking code quality (you want to see no output here)"
|
2022-01-10 20:56:59 +00:00
|
|
|
echo ""
|
2020-02-06 00:42:32 +00:00
|
|
|
|
|
|
|
echo "Vetting:"
|
|
|
|
go list ./... | xargs go vet
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "Linting:"
|
|
|
|
|
2022-01-10 20:56:59 +00:00
|
|
|
staticcheck ./...
|
|
|
|
|
|
|
|
|
|
|
|
echo "Time to format"
|
|
|
|
gofmt -l -s -w .
|
2020-02-06 00:42:32 +00:00
|
|
|
|
|
|
|
# ineffassign (https://github.com/gordonklaus/ineffassign)
|
|
|
|
echo "Checking for ineffectual assignment of errors (unchecked errors...)"
|
|
|
|
ineffassign .
|
|
|
|
|
2022-01-10 20:56:59 +00:00
|
|
|
# misspell (https://github.com/client9/misspell/cmd/misspell)
|
2020-02-06 00:42:32 +00:00
|
|
|
echo "Checking for misspelled words..."
|
2022-01-10 20:56:59 +00:00
|
|
|
misspell . | grep -v "testing/" | grep -v "vendor/" | grep -v "go.sum" | grep -v ".idea"
|