From dbc3d675ec0237035d964fe65c9c7079787150f1 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Mon, 10 Jan 2022 12:56:59 -0800 Subject: [PATCH] Update quality to staticcheck --- testing/quality.sh | 14 ++++++++------ tor/torProvider.go | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/testing/quality.sh b/testing/quality.sh index 0599b46..5262cc6 100755 --- a/testing/quality.sh +++ b/testing/quality.sh @@ -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" diff --git a/tor/torProvider.go b/tor/torProvider.go index 8510d8d..8d4b954 100644 --- a/tor/torProvider.go +++ b/tor/torProvider.go @@ -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()