Update quality to staticcheck
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2022-01-10 12:56:59 -08:00
parent d3398bd074
commit dbc3d675ec
2 changed files with 9 additions and 7 deletions

View File

@ -1,9 +1,7 @@
#!/bin/sh
echo "Checking code quality (you want to see no output here)"
echo "Formatting:"
gofmt -s -w -l .
echo ""
echo "Vetting:"
go list ./... | xargs go vet
@ -11,12 +9,16 @@ go list ./... | xargs go vet
echo ""
echo "Linting:"
go list ./... | xargs golint
staticcheck ./...
echo "Time to format"
gofmt -l -s -w .
# ineffassign (https://github.com/gordonklaus/ineffassign)
echo "Checking for ineffectual assignment of errors (unchecked errors...)"
ineffassign .
# misspell (https://github.com/client9/misspell)
# misspell (https://github.com/client9/misspell/cmd/misspell)
echo "Checking for misspelled words..."
go list ./... | xargs misspell
misspell . | grep -v "testing/" | grep -v "vendor/" | grep -v "go.sum" | grep -v ".idea"

View File

@ -410,7 +410,7 @@ func startTor(appDirectory string, bundledTorPath string, controlPort int, authe
tp.t = t
} else {
log.Debugln("Could not find a viable tor running or to run")
return nil, fmt.Errorf("Could not connect to or start Tor that met requirements (min Tor version 0.3.5.x)")
return nil, fmt.Errorf("could not connect to or start Tor that met requirements (min Tor version 0.3.5.x)")
}
err = tp.checkVersion()