From 347ac3cf48da4964fa252dfa09c4029c2695c6a3 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Tue, 2 Jan 2024 12:33:31 -0800 Subject: [PATCH] Fixup Formatting and Quality Script ineffassign and misspell are no longer compatible with previous go workflows and the latest versions do not work. Commenting for now with intent to replace with better tooling. --- app/plugins/contactRetry.go | 4 ++-- go.mod | 1 + go.sum | 2 ++ testing/quality.sh | 8 ++++---- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/plugins/contactRetry.go b/app/plugins/contactRetry.go index 8853c1c..74a3ef9 100644 --- a/app/plugins/contactRetry.go +++ b/app/plugins/contactRetry.go @@ -462,8 +462,8 @@ func (cr *contactRetry) addConnection(id string, state connections.ConnectionSta } else { // we have rerequested this connnection, probably via an explicit ask, update it's state if c, ok := cr.connections.Load(id); ok { - contact := c.(*contact) - contact.state = state + contact := c.(*contact) + contact.state = state } } } diff --git a/go.mod b/go.mod index afcb490..7c7f8f3 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,7 @@ require ( require ( filippo.io/edwards25519 v1.0.0 // indirect git.openprivacy.ca/openprivacy/bine v0.0.5 // indirect + github.com/client9/misspell v0.3.4 // indirect github.com/google/go-cmp v0.5.8 // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b // indirect diff --git a/go.sum b/go.sum index a033e11..2893bb5 100644 --- a/go.sum +++ b/go.sum @@ -8,6 +8,8 @@ git.openprivacy.ca/openprivacy/connectivity v1.11.0 h1:roASjaFtQLu+HdH5fa2wx6F00 git.openprivacy.ca/openprivacy/connectivity v1.11.0/go.mod h1:OQO1+7OIz/jLxDrorEMzvZA6SEbpbDyLGpjoFqT3z1Y= git.openprivacy.ca/openprivacy/log v1.0.3 h1:E/PMm4LY+Q9s3aDpfySfEDq/vYQontlvNj/scrPaga0= git.openprivacy.ca/openprivacy/log v1.0.3/go.mod h1:gGYK8xHtndRLDymFtmjkG26GaMQNgyhioNS82m812Iw= +github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/testing/quality.sh b/testing/quality.sh index 0827cb5..0961079 100755 --- a/testing/quality.sh +++ b/testing/quality.sh @@ -19,9 +19,9 @@ echo "Time to format" gofmt -l -s -w . # ineffassign (https://github.com/gordonklaus/ineffassign) -echo "Checking for ineffectual assignment of errors (unchecked errors...)" -ineffassign ./.. +# echo "Checking for ineffectual assignment of errors (unchecked errors...)" +# ineffassign . # misspell (https://github.com/client9/misspell/cmd/misspell) -echo "Checking for misspelled words..." -misspell . | grep -v "testing/" | grep -v "vendor/" | grep -v "go.sum" | grep -v ".idea" +# echo "Checking for misspelled words..." +# misspell . | grep -v "testing/" | grep -v "vendor/" | grep -v "go.sum" | grep -v ".idea"