cwtch/testing/quality.sh

25 lines
541 B
Bash
Raw Normal View History

#!/bin/sh
echo "Checking code quality (you want to see no output here)"
echo ""
echo "Vetting:"
go vet ./...
echo ""
echo "Linting:"
2021-11-17 23:59:52 +00:00
staticcheck ./...
2018-06-29 19:20:07 +00:00
echo "Time to format"
gofmt -l -s -w .
2019-01-28 20:09:25 +00:00
# ineffassign (https://github.com/gordonklaus/ineffassign)
echo "Checking for ineffectual assignment of errors (unchecked errors...)"
ineffassign ./...
2019-01-28 20:09:25 +00:00
# misspell (https://github.com/client9/misspell/cmd/misspell)
2019-01-28 20:09:25 +00:00
echo "Checking for misspelled words..."
2021-11-17 23:59:52 +00:00
misspell . | grep -v "testing/" | grep -v "vendor/" | grep -v "go.sum" | grep -v ".idea"