1
0
Fork 0
mirror of https://github.com/matrix-org/gomatrix synced 2025-06-07 15:23:24 +00:00

Switch to golangci-lint

This commit is contained in:
Paul Tötterman 2020-03-02 16:09:42 +02:00
parent 9e7906b676
commit 911b396dd1
6 changed files with 26 additions and 32 deletions

View file

@ -2,25 +2,6 @@
set -eu
golint
misspell --error .
golangci-lint run
# gofmt doesn't exit with an error code if the files don't match the expected
# format. So we have to run it and see if it outputs anything.
if gofmt -l -s . 2>&1 | read
then
echo "Error: not all code had been formatted with gofmt."
echo "Fixing the following files"
gofmt -s -w -l .
echo
echo "Please add them to the commit"
git status --short
exit 1
fi
ineffassign .
go fmt
go tool vet --all --shadow .
gocyclo -over 12 .
go test -timeout 5s -test.v