From 5387dd1cba1f02ba5409249580907173535157ab Mon Sep 17 00:00:00 2001 From: Jack Smith Date: Mon, 29 Aug 2022 08:03:23 -0600 Subject: [PATCH 01/14] Fixing golangci-lint and github action --- scripts/travis/codegen_verification.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/travis/codegen_verification.sh b/scripts/travis/codegen_verification.sh index f442959c45..895efb8b3f 100755 --- a/scripts/travis/codegen_verification.sh +++ b/scripts/travis/codegen_verification.sh @@ -42,7 +42,8 @@ function runGoFmt() { } function runGoLint() { - warningCount=$("$GOPATH"/bin/golangci-lint -c .golangci.yml | wc -l | tr -d ' ') + "$GOPATH"/bin/golangci-lint run -c .golangci.yml > temp-golangci-lint-results.txt + warningCount=$(cat temp-golangci-lint-results.txt | wc -l | tr -d ' ') if [ "${warningCount}" = "0" ]; then return 0 fi From 090e49a56c52b46728106f22c6dbc15616b099ab Mon Sep 17 00:00:00 2001 From: Jack Smith Date: Mon, 29 Aug 2022 08:30:52 -0600 Subject: [PATCH 02/14] debugging golangci-lint --- scripts/travis/codegen_verification.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/travis/codegen_verification.sh b/scripts/travis/codegen_verification.sh index 895efb8b3f..0a432e87d4 100755 --- a/scripts/travis/codegen_verification.sh +++ b/scripts/travis/codegen_verification.sh @@ -43,17 +43,22 @@ function runGoFmt() { function runGoLint() { "$GOPATH"/bin/golangci-lint run -c .golangci.yml > temp-golangci-lint-results.txt + echo "golangci-lint finished with exit code: {$?}" + echo "START OF temp-golangci-lint-results.txt" + cat temp-golangci-lint-results.txt + echo "END OF temp-golangci-lint-results.txt" warningCount=$(cat temp-golangci-lint-results.txt | wc -l | tr -d ' ') + echo "warningCount is: ${warningCount}" if [ "${warningCount}" = "0" ]; then + echo "Exiting golangci-lint successfully because warningCount = 0" return 0 fi + echo "Golangci-lint errored out:" + cat temp-golangci-lint-results.txt >&2 + echo >&2 "golangci-lint must be clean. Please see above list issues(${warningCount}):" + echo >&2 "To replicate please run: make lint" - echo >&2 "golangci-lint must be clean. Please run the following to list issues(${warningCount}):" - echo >&2 " make lint" - - # run the linter again to output the actual issues - "$GOPATH"/bin/golangci-lint -c .golangci.yml >&2 - return 1 + exit 1 } echo "Running gofmt..." @@ -62,6 +67,9 @@ runGoFmt echo "Running golangci-lint..." runGoLint +"Exiting because runGoLint didn't work properly." # REMOVE +exit 1 + echo "Running check_license..." ./scripts/check_license.sh From d0e83f588715ee540aec7e1595c35fb8173bd45e Mon Sep 17 00:00:00 2001 From: Jack Smith Date: Mon, 29 Aug 2022 09:32:10 -0600 Subject: [PATCH 03/14] Adjust golangci-lint version --- scripts/buildtools/versions | 2 +- scripts/travis/codegen_verification.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/buildtools/versions b/scripts/buildtools/versions index 04960db22f..0433753979 100644 --- a/scripts/buildtools/versions +++ b/scripts/buildtools/versions @@ -4,4 +4,4 @@ github.com/algorand/msgp v1.1.52 github.com/algorand/oapi-codegen v1.3.7 github.com/go-swagger/go-swagger v0.25.0 gotest.tools/gotestsum v1.6.4 -github.com/golangci/golangci-lint/cmd/golangci-lint v1.47.3 +github.com/golangci/golangci-lint/cmd/golangci-lint v1.49.0 diff --git a/scripts/travis/codegen_verification.sh b/scripts/travis/codegen_verification.sh index 0a432e87d4..196be2107c 100755 --- a/scripts/travis/codegen_verification.sh +++ b/scripts/travis/codegen_verification.sh @@ -62,13 +62,13 @@ function runGoLint() { } echo "Running gofmt..." -runGoFmt +# runGoFmt # UNCOMMENT echo "Running golangci-lint..." runGoLint "Exiting because runGoLint didn't work properly." # REMOVE -exit 1 +exit 1 # REMOVE echo "Running check_license..." ./scripts/check_license.sh From 35feeb181026dd795632014c33b2bc6e2b448e53 Mon Sep 17 00:00:00 2001 From: Jack Smith Date: Mon, 29 Aug 2022 12:05:31 -0600 Subject: [PATCH 04/14] Fixing golangci-lint --- scripts/buildtools/versions | 2 +- scripts/travis/codegen_verification.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/buildtools/versions b/scripts/buildtools/versions index 0433753979..04960db22f 100644 --- a/scripts/buildtools/versions +++ b/scripts/buildtools/versions @@ -4,4 +4,4 @@ github.com/algorand/msgp v1.1.52 github.com/algorand/oapi-codegen v1.3.7 github.com/go-swagger/go-swagger v0.25.0 gotest.tools/gotestsum v1.6.4 -github.com/golangci/golangci-lint/cmd/golangci-lint v1.49.0 +github.com/golangci/golangci-lint/cmd/golangci-lint v1.47.3 diff --git a/scripts/travis/codegen_verification.sh b/scripts/travis/codegen_verification.sh index 196be2107c..b10de4c87f 100755 --- a/scripts/travis/codegen_verification.sh +++ b/scripts/travis/codegen_verification.sh @@ -65,7 +65,8 @@ echo "Running gofmt..." # runGoFmt # UNCOMMENT echo "Running golangci-lint..." -runGoLint +#runGoLint +"$GOPATH"/bin/golangci-lint run -c .golangci.yml "Exiting because runGoLint didn't work properly." # REMOVE exit 1 # REMOVE From b00423361212432d5fb84406f1d921b79f219efc Mon Sep 17 00:00:00 2001 From: Jack Smith Date: Mon, 29 Aug 2022 12:36:00 -0600 Subject: [PATCH 05/14] Fixing golangci-lint --- scripts/travis/codegen_verification.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/travis/codegen_verification.sh b/scripts/travis/codegen_verification.sh index b10de4c87f..1b0548f4d6 100755 --- a/scripts/travis/codegen_verification.sh +++ b/scripts/travis/codegen_verification.sh @@ -66,6 +66,8 @@ echo "Running gofmt..." echo "Running golangci-lint..." #runGoLint +"$GOPATH"/bin/golangci-lint --version +which golangci-lint "$GOPATH"/bin/golangci-lint run -c .golangci.yml "Exiting because runGoLint didn't work properly." # REMOVE From 4f5282ef53a255a5401bf32efbc7aea0bfebd8b0 Mon Sep 17 00:00:00 2001 From: Jack Smith Date: Mon, 29 Aug 2022 12:50:43 -0600 Subject: [PATCH 06/14] Fixing golangci-lint --- scripts/travis/codegen_verification.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/travis/codegen_verification.sh b/scripts/travis/codegen_verification.sh index 1b0548f4d6..56009e0591 100755 --- a/scripts/travis/codegen_verification.sh +++ b/scripts/travis/codegen_verification.sh @@ -66,11 +66,13 @@ echo "Running gofmt..." echo "Running golangci-lint..." #runGoLint +set -x "$GOPATH"/bin/golangci-lint --version which golangci-lint "$GOPATH"/bin/golangci-lint run -c .golangci.yml "Exiting because runGoLint didn't work properly." # REMOVE +set +x exit 1 # REMOVE echo "Running check_license..." From 56fae5a49ecb5f31eee869d85feb3baa4bd6bccf Mon Sep 17 00:00:00 2001 From: Jack Smith Date: Mon, 29 Aug 2022 12:59:00 -0600 Subject: [PATCH 07/14] Fixing golangci-lint --- scripts/travis/codegen_verification.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/travis/codegen_verification.sh b/scripts/travis/codegen_verification.sh index 56009e0591..81d0c7a344 100755 --- a/scripts/travis/codegen_verification.sh +++ b/scripts/travis/codegen_verification.sh @@ -68,7 +68,7 @@ echo "Running golangci-lint..." #runGoLint set -x "$GOPATH"/bin/golangci-lint --version -which golangci-lint + "$GOPATH"/bin/golangci-lint run -c .golangci.yml "Exiting because runGoLint didn't work properly." # REMOVE From 2eda33808c77efd1d274c8dbfcc875ca47fcb09e Mon Sep 17 00:00:00 2001 From: Jack Smith Date: Mon, 29 Aug 2022 13:09:30 -0600 Subject: [PATCH 08/14] Fixing golangci-lint --- scripts/travis/codegen_verification.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/travis/codegen_verification.sh b/scripts/travis/codegen_verification.sh index 81d0c7a344..b5e5ef6b93 100755 --- a/scripts/travis/codegen_verification.sh +++ b/scripts/travis/codegen_verification.sh @@ -68,8 +68,9 @@ echo "Running golangci-lint..." #runGoLint set -x "$GOPATH"/bin/golangci-lint --version - +sleep 5 "$GOPATH"/bin/golangci-lint run -c .golangci.yml +sleep 30 "Exiting because runGoLint didn't work properly." # REMOVE set +x From 3293eec507fa76418b184c37f7c6e56aa4b3c26a Mon Sep 17 00:00:00 2001 From: Jack Smith Date: Mon, 29 Aug 2022 13:26:03 -0600 Subject: [PATCH 09/14] Fixing golangci-lint --- scripts/travis/codegen_verification.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/travis/codegen_verification.sh b/scripts/travis/codegen_verification.sh index b5e5ef6b93..dc336b0013 100755 --- a/scripts/travis/codegen_verification.sh +++ b/scripts/travis/codegen_verification.sh @@ -67,12 +67,14 @@ echo "Running gofmt..." echo "Running golangci-lint..." #runGoLint set -x -"$GOPATH"/bin/golangci-lint --version +"$GOPATH"/bin/golangci-lint run +echo "golangci-lint exited with: $?" sleep 5 "$GOPATH"/bin/golangci-lint run -c .golangci.yml -sleep 30 +echo "golangci-lint exited with: $?" +sleep 5 -"Exiting because runGoLint didn't work properly." # REMOVE +echo "Exiting because runGoLint didn't fail properly." # REMOVE set +x exit 1 # REMOVE From cbaeea4ec11599db3db3ac4f014b1ea0cb13b04c Mon Sep 17 00:00:00 2001 From: Jack Smith Date: Mon, 29 Aug 2022 13:47:17 -0600 Subject: [PATCH 10/14] Fixing golangci-lint --- .golangci.yml | 16 +++++++++++-- scripts/travis/codegen_verification.sh | 33 +------------------------- 2 files changed, 15 insertions(+), 34 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 8af53cf27f..825ca090c8 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,6 @@ run: timeout: 5m - tests: false + tests: true linters: # default: deadcode, errcheck, gosimple, govet, ineffassign, staticcheck, typecheck, unused, varcheck @@ -67,11 +67,23 @@ issues: exclude-rules: # Add all linters here -- Comment this block out for testing linters + - path: _test\.go + linters: + - errcheck + - gofmt + - gosimple + - govet + - ineffassign + - misspell + - nolintlint + # - revive + - staticcheck + - typecheck - path: test/linttest/lintissues\.go linters: - errcheck - gofmt - - golint + - revive - govet - ineffassign - misspell diff --git a/scripts/travis/codegen_verification.sh b/scripts/travis/codegen_verification.sh index dc336b0013..558b1659dc 100755 --- a/scripts/travis/codegen_verification.sh +++ b/scripts/travis/codegen_verification.sh @@ -41,42 +41,11 @@ function runGoFmt() { return 1 } -function runGoLint() { - "$GOPATH"/bin/golangci-lint run -c .golangci.yml > temp-golangci-lint-results.txt - echo "golangci-lint finished with exit code: {$?}" - echo "START OF temp-golangci-lint-results.txt" - cat temp-golangci-lint-results.txt - echo "END OF temp-golangci-lint-results.txt" - warningCount=$(cat temp-golangci-lint-results.txt | wc -l | tr -d ' ') - echo "warningCount is: ${warningCount}" - if [ "${warningCount}" = "0" ]; then - echo "Exiting golangci-lint successfully because warningCount = 0" - return 0 - fi - echo "Golangci-lint errored out:" - cat temp-golangci-lint-results.txt >&2 - echo >&2 "golangci-lint must be clean. Please see above list issues(${warningCount}):" - echo >&2 "To replicate please run: make lint" - - exit 1 -} - echo "Running gofmt..." -# runGoFmt # UNCOMMENT +runGoFmt echo "Running golangci-lint..." -#runGoLint -set -x -"$GOPATH"/bin/golangci-lint run -echo "golangci-lint exited with: $?" -sleep 5 "$GOPATH"/bin/golangci-lint run -c .golangci.yml -echo "golangci-lint exited with: $?" -sleep 5 - -echo "Exiting because runGoLint didn't fail properly." # REMOVE -set +x -exit 1 # REMOVE echo "Running check_license..." ./scripts/check_license.sh From dd37a0ec18f26a8ab49242e13ed7d225e825504f Mon Sep 17 00:00:00 2001 From: Jack Smith Date: Mon, 29 Aug 2022 14:04:22 -0600 Subject: [PATCH 11/14] Fixing golangci-lint --- .golangci-warnings.yml | 2 -- .golangci.yml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.golangci-warnings.yml b/.golangci-warnings.yml index 769ea9ddbd..f0f2eee48e 100644 --- a/.golangci-warnings.yml +++ b/.golangci-warnings.yml @@ -39,8 +39,6 @@ issues: exclude: # ignore govet false positive fixed in https://github.com/golang/go/issues/45043 - "sigchanyzer: misuse of unbuffered os.Signal channel as argument to signal.Notify" - # ignore golint false positive fixed in https://github.com/golang/lint/pull/487 - - "exported method (.*).Unwrap` should have comment or be unexported" # ignore issues about the way we use _struct fields to define encoding settings - "`_struct` is unused" diff --git a/.golangci.yml b/.golangci.yml index 825ca090c8..271c682e50 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -66,7 +66,6 @@ issues: - "var-naming: don't use leading k in Go names" exclude-rules: - # Add all linters here -- Comment this block out for testing linters - path: _test\.go linters: - errcheck @@ -79,6 +78,7 @@ issues: # - revive - staticcheck - typecheck + # Add all linters here -- Comment this block out for testing linters - path: test/linttest/lintissues\.go linters: - errcheck From f7f80020f792386226fda614c8407ac78244c4c1 Mon Sep 17 00:00:00 2001 From: chris erway Date: Mon, 29 Aug 2022 16:45:24 -0400 Subject: [PATCH 12/14] fix revive issues in test code --- ledger/internal/apptxn_test.go | 38 +++++++++++++-------------- ledger/internal/eval_blackbox_test.go | 16 +++++------ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/ledger/internal/apptxn_test.go b/ledger/internal/apptxn_test.go index b0d082324f..ca09429a5c 100644 --- a/ledger/internal/apptxn_test.go +++ b/ledger/internal/apptxn_test.go @@ -2479,7 +2479,7 @@ func TestInnerClearState(t *testing.T) { eval := nextBlock(t, l) txn(t, l, eval, &inner) vb := endBlock(t, l, eval) - innerId := vb.Block().Payset[0].ApplicationID + innerID := vb.Block().Payset[0].ApplicationID // Outer is a simple app that will invoke the given app (in ForeignApps[0]) // with the given OnCompletion (in ApplicationArgs[0]). Goal is to use it @@ -2498,33 +2498,33 @@ itxn_begin itxn_field OnCompletion itxn_submit `), - ForeignApps: []basics.AppIndex{innerId}, + ForeignApps: []basics.AppIndex{innerID}, } eval = nextBlock(t, l) txn(t, l, eval, &outer) vb = endBlock(t, l, eval) - outerId := vb.Block().Payset[0].ApplicationID + outerID := vb.Block().Payset[0].ApplicationID fund := txntest.Txn{ Type: "pay", Sender: addrs[0], - Receiver: outerId.Address(), + Receiver: outerID.Address(), Amount: 1_000_000, } call := txntest.Txn{ Type: "appl", Sender: addrs[0], - ApplicationID: outerId, + ApplicationID: outerID, ApplicationArgs: [][]byte{{byte(transactions.OptInOC)}}, - ForeignApps: []basics.AppIndex{innerId}, + ForeignApps: []basics.AppIndex{innerID}, } eval = nextBlock(t, l) txns(t, l, eval, &fund, &call) endBlock(t, l, eval) - outerAcct := lookup(t, l, outerId.Address()) + outerAcct := lookup(t, l, outerID.Address()) require.Len(t, outerAcct.AppLocalStates, 1) require.Equal(t, outerAcct.TotalAppSchema, basics.StateSchema{ NumUint: 2, @@ -2536,7 +2536,7 @@ itxn_submit txn(t, l, eval, &call) endBlock(t, l, eval) - outerAcct = lookup(t, l, outerId.Address()) + outerAcct = lookup(t, l, outerID.Address()) require.Empty(t, outerAcct.AppLocalStates) require.Empty(t, outerAcct.TotalAppSchema) @@ -2567,7 +2567,7 @@ b top eval := nextBlock(t, l) txn(t, l, eval, &badCallee) vb := endBlock(t, l, eval) - badId := vb.Block().Payset[0].ApplicationID + badID := vb.Block().Payset[0].ApplicationID // Outer is a simple app that will invoke the given app (in ForeignApps[0]) // with the given OnCompletion (in ApplicationArgs[0]). Goal is to use it @@ -2603,33 +2603,33 @@ bnz skip // Don't do budget checking during optin assert skip: `), - ForeignApps: []basics.AppIndex{badId}, + ForeignApps: []basics.AppIndex{badID}, } eval = nextBlock(t, l) txn(t, l, eval, &outer) vb = endBlock(t, l, eval) - outerId := vb.Block().Payset[0].ApplicationID + outerID := vb.Block().Payset[0].ApplicationID fund := txntest.Txn{ Type: "pay", Sender: addrs[0], - Receiver: outerId.Address(), + Receiver: outerID.Address(), Amount: 1_000_000, } call := txntest.Txn{ Type: "appl", Sender: addrs[0], - ApplicationID: outerId, + ApplicationID: outerID, ApplicationArgs: [][]byte{{byte(transactions.OptInOC)}}, - ForeignApps: []basics.AppIndex{badId}, + ForeignApps: []basics.AppIndex{badID}, } eval = nextBlock(t, l) txns(t, l, eval, &fund, &call) endBlock(t, l, eval) - outerAcct := lookup(t, l, outerId.Address()) + outerAcct := lookup(t, l, outerID.Address()) require.Len(t, outerAcct.AppLocalStates, 1) // When doing a clear state, `call` checks that budget wasn't stolen @@ -2639,7 +2639,7 @@ skip: endBlock(t, l, eval) // Clearstate took effect, despite failure from infinite loop - outerAcct = lookup(t, l, outerId.Address()) + outerAcct = lookup(t, l, outerID.Address()) require.Empty(t, outerAcct.AppLocalStates) } @@ -2697,8 +2697,8 @@ log eval := nextBlock(t, l) txns(t, l, eval, &inner, &waster) vb := endBlock(t, l, eval) - innerId := vb.Block().Payset[0].ApplicationID - wasterId := vb.Block().Payset[1].ApplicationID + innerID := vb.Block().Payset[0].ApplicationID + wasterID := vb.Block().Payset[1].ApplicationID // Grouper is a simple app that will invoke the given apps (in // ForeignApps[0,1]) as a group, with the given OnCompletion (in @@ -2744,7 +2744,7 @@ itxn_submit Sender: addrs[0], ApplicationID: grouperId, ApplicationArgs: [][]byte{{byte(transactions.OptInOC)}, {byte(transactions.OptInOC)}}, - ForeignApps: []basics.AppIndex{wasterId, innerId}, + ForeignApps: []basics.AppIndex{wasterID, innerID}, } eval = nextBlock(t, l) txns(t, l, eval, &fund, &call) diff --git a/ledger/internal/eval_blackbox_test.go b/ledger/internal/eval_blackbox_test.go index 8f8f7f1a35..b6eb6b9c16 100644 --- a/ledger/internal/eval_blackbox_test.go +++ b/ledger/internal/eval_blackbox_test.go @@ -1047,13 +1047,13 @@ func TestLogsInBlock(t *testing.T) { } vb := dl.fullBlock(&createTxn) createInBlock := vb.Block().Payset[0] - appId := createInBlock.ApplyData.ApplicationID + appID := createInBlock.ApplyData.ApplicationID require.Equal(t, "APP", createInBlock.ApplyData.EvalDelta.Logs[0]) optInTxn := txntest.Txn{ Type: protocol.ApplicationCallTx, Sender: addrs[1], - ApplicationID: appId, + ApplicationID: appID, OnCompletion: transactions.OptInOC, } vb = dl.fullBlock(&optInTxn) @@ -1063,7 +1063,7 @@ func TestLogsInBlock(t *testing.T) { clearTxn := txntest.Txn{ Type: protocol.ApplicationCallTx, Sender: addrs[1], - ApplicationID: appId, + ApplicationID: appID, OnCompletion: transactions.ClearStateOC, } vb = dl.fullBlock(&clearTxn) @@ -1102,7 +1102,7 @@ func TestUnfundedSenders(t *testing.T) { ghost := basics.Address{0x01} - asa_create := txntest.Txn{ + asaCreate := txntest.Txn{ Type: "acfg", Sender: addrs[0], AssetParams: basics.AssetParams{ @@ -1113,12 +1113,12 @@ func TestUnfundedSenders(t *testing.T) { }, } - app_create := txntest.Txn{ + appCreate := txntest.Txn{ Type: "appl", Sender: addrs[0], } - dl.fullBlock(&asa_create, &app_create) + dl.fullBlock(&asaCreate, &appCreate) // Advance so that rewardsLevel increases for i := 1; i < 10; i++ { @@ -1230,7 +1230,7 @@ func TestAppCallAppDuringInit(t *testing.T) { dl.fullBlock() } - call_in_init := txntest.Txn{ + callInInit := txntest.Txn{ Type: "appl", Sender: addrs[0], ApprovalProgram: ` @@ -1251,6 +1251,6 @@ func TestAppCallAppDuringInit(t *testing.T) { // In the old days, balances.Move would try to increase the rewardsState on the unfunded account problem = "balance 0 below min" } - dl.txn(&call_in_init, problem) + dl.txn(&callInInit, problem) }) } From 849e0314d29419182697e2a75954ae2473897475 Mon Sep 17 00:00:00 2001 From: Jack Smith Date: Mon, 29 Aug 2022 14:46:05 -0600 Subject: [PATCH 13/14] Removing gofmt and golangci-lint from codegen_verification.sh --- scripts/travis/codegen_verification.sh | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/scripts/travis/codegen_verification.sh b/scripts/travis/codegen_verification.sh index 558b1659dc..8ba594d7b1 100755 --- a/scripts/travis/codegen_verification.sh +++ b/scripts/travis/codegen_verification.sh @@ -27,26 +27,6 @@ eval "$(~/gimme "${GOLANG_VERSION}")" make gen SHORT_PART_PERIOD=1 -function runGoFmt() { - unformatted=$(gofmt -l .) - [ -z "$unformatted" ] && return 0 - - # Some files are not gofmt'd. Print message and fail. - - echo >&2 "Go files must be formatted with gofmt. Please run:" - for fn in $unformatted; do - echo >&2 " gofmt -w $PWD/$fn" - done - - return 1 -} - -echo "Running gofmt..." -runGoFmt - -echo "Running golangci-lint..." -"$GOPATH"/bin/golangci-lint run -c .golangci.yml - echo "Running check_license..." ./scripts/check_license.sh From 33533aad91d3f90df6dddd8bc85c0c9c3d1bb0d0 Mon Sep 17 00:00:00 2001 From: chris erway Date: Mon, 29 Aug 2022 16:57:09 -0400 Subject: [PATCH 14/14] fix another revive error --- ledger/internal/apptxn_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ledger/internal/apptxn_test.go b/ledger/internal/apptxn_test.go index ca09429a5c..86a4a7feab 100644 --- a/ledger/internal/apptxn_test.go +++ b/ledger/internal/apptxn_test.go @@ -2730,19 +2730,19 @@ itxn_submit eval = nextBlock(t, l) txn(t, l, eval, &grouper) vb = endBlock(t, l, eval) - grouperId := vb.Block().Payset[0].ApplicationID + grouperID := vb.Block().Payset[0].ApplicationID fund := txntest.Txn{ Type: "pay", Sender: addrs[0], - Receiver: grouperId.Address(), + Receiver: grouperID.Address(), Amount: 1_000_000, } call := txntest.Txn{ Type: "appl", Sender: addrs[0], - ApplicationID: grouperId, + ApplicationID: grouperID, ApplicationArgs: [][]byte{{byte(transactions.OptInOC)}, {byte(transactions.OptInOC)}}, ForeignApps: []basics.AppIndex{wasterID, innerID}, } @@ -2750,7 +2750,7 @@ itxn_submit txns(t, l, eval, &fund, &call) endBlock(t, l, eval) - gAcct := lookup(t, l, grouperId.Address()) + gAcct := lookup(t, l, grouperID.Address()) require.Len(t, gAcct.AppLocalStates, 2) call.ApplicationArgs = [][]byte{{byte(transactions.CloseOutOC)}, {byte(transactions.ClearStateOC)}} @@ -2760,7 +2760,7 @@ itxn_submit require.Len(t, vb.Block().Payset, 0) // Clearstate did not take effect, since the caller tried to shortchange the CSP - gAcct = lookup(t, l, grouperId.Address()) + gAcct = lookup(t, l, grouperID.Address()) require.Len(t, gAcct.AppLocalStates, 2) }