server/testing/quality.sh

24 lines
588 B
Bash
Raw Permalink Normal View History

2021-05-07 18:36:34 +00:00
#!/bin/sh
echo "Checking code quality (you want to see no output here)"
echo ""
echo "Vetting:"
go list ./... | xargs go vet
echo ""
echo "Linting:"
2024-03-09 22:10:46 +00:00
go list ./... | staticcheck ./...
2021-05-07 18:36:34 +00:00
2024-03-09 21:51:16 +00:00
echo "Running nilaway..."
2024-03-09 22:10:46 +00:00
nilaway -include-pkgs="cwtch.im/server,cwtch.im/cwtch,cwtch.im/tapir,git.openprivacy.ca/openprivacy/connectivity" -exclude-file-docstrings="nolint:nilaway" ./...
2024-03-09 21:51:16 +00:00
2021-05-07 18:36:34 +00:00
echo "Time to format"
gofmt -l -s -w .
# misspell (https://github.com/client9/misspell/cmd/misspell)
echo "Checking for misspelled words..."
misspell . | grep -v "vendor/" | grep -v "go.sum" | grep -v ".idea"