Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4.0.1
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- run: go version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
id: go_version
run: echo "GO_VERSION=$(./scripts/get_golang_version.sh)" >> $GITHUB_ENV
- name: Install golang
uses: actions/setup-go@v4.0.1
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Restore libsodium from cache
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- name: Make libsodium.a
run: sudo mv /usr/bin/go /usr/bin/go.bak && make crypto/libs/linux/amd64/lib/libsodium.a && sudo mv /usr/bin/go.bak /usr/bin/go
- name: reviewdog-golangci-lint
uses: reviewdog/[email protected].1
uses: reviewdog/[email protected].2
with:
go_version_file: go.mod
golangci_lint_version: "v1.58.0"
golangci_lint_version: "v1.62.0"
golangci_lint_flags: "-c .golangci.yml --allow-parallel-runners"
reporter: "github-pr-check"
tool_name: "Lint Errors"
Expand All @@ -46,7 +46,7 @@ jobs:
id: go_version
run: echo "GO_VERSION=$(./scripts/get_golang_version.sh)" >> $GITHUB_ENV
- name: Install specific golang
uses: actions/setup-go@v4.0.1
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Create folders for golangci-lint
Expand All @@ -63,13 +63,13 @@ jobs:
run: |
cd cicdtmp/golangci-lint
git clone https://github.com/golangci/golangci-lint.git .
git checkout tags/v1.58.0
git checkout tags/v1.62.0
CGO_ENABLED=true go build -trimpath -o golangci-lint-cgo ./cmd/golangci-lint
./golangci-lint-cgo --version
cd ../../
- name: Install reviewdog
run: |
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/v0.18.1/install.sh | sh -s -- v0.18.1
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/v0.20.2/install.sh | sh -s -- v0.20.2
reviewdog --version
- name: Build custom linters
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
id: go_version
run: echo "GO_VERSION=$(./scripts/get_golang_version.sh)" >> $GITHUB_ENV
- name: Install go version
uses: actions/setup-go@v4.0.1
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Test tools/block-generator
Expand Down
3 changes: 1 addition & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ linters:
disable-all: true
enable:
- errcheck
- exportloopref
- copyloopvar
- gofmt
- gosimple
- govet
Expand Down Expand Up @@ -127,7 +127,6 @@ issues:
- path: _test\.go
linters:
- errcheck
# - exportloopref
# - gofmt
- gosimple
# - govet
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:20.04 as builder

ARG GO_VERSION="1.21.10"
ARG GO_VERSION="1.23.3"

ARG CHANNEL
ARG URL
Expand Down
1 change: 0 additions & 1 deletion catchup/ledgerFetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ func TestLedgerFetcherErrorResponseHandling(t *testing.T) {
},
}
for _, tc := range testcases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
// create a dummy server.
Expand Down
1 change: 0 additions & 1 deletion cmd/algocfg/getCommand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ func TestPrint(t *testing.T) {
},
}
for i, tc := range testcases {
tc := tc
t.Run(fmt.Sprintf("test %d", i), func(t *testing.T) {
t.Parallel()
ret, err := serializeObjectProperty(tc, "Input")
Expand Down
34 changes: 17 additions & 17 deletions cmd/goal/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
func newAppCallBytes(arg string) apps.AppCallBytes {
appBytes, err := apps.NewAppCallBytes(arg)
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())
}
return appBytes
}
Expand Down Expand Up @@ -508,7 +508,7 @@
err = writeTxnToFile(client, sign, dataDir, walletName, tx, outFilename)
}
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())

Check warning on line 511 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L511

Added line #L511 was not covered by tests
}
}
},
Expand Down Expand Up @@ -569,7 +569,7 @@
if !noWaitAfterSend {
_, err2 = waitForCommit(client, txid, lv)
if err2 != nil {
reportErrorf(err2.Error())
reportErrorln(err2.Error())

Check warning on line 572 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L572

Added line #L572 was not covered by tests
}
}
} else {
Expand All @@ -579,7 +579,7 @@
err = writeTxnToFile(client, sign, dataDir, walletName, tx, outFilename)
}
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())

Check warning on line 582 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L582

Added line #L582 was not covered by tests
}
}
},
Expand Down Expand Up @@ -639,7 +639,7 @@
if !noWaitAfterSend {
_, err2 = waitForCommit(client, txid, lv)
if err2 != nil {
reportErrorf(err2.Error())
reportErrorln(err2.Error())

Check warning on line 642 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L642

Added line #L642 was not covered by tests
}
}
} else {
Expand All @@ -649,7 +649,7 @@
err = writeTxnToFile(client, sign, dataDir, walletName, tx, outFilename)
}
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())

Check warning on line 652 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L652

Added line #L652 was not covered by tests
}
}
},
Expand Down Expand Up @@ -709,7 +709,7 @@
if !noWaitAfterSend {
_, err2 = waitForCommit(client, txid, lv)
if err2 != nil {
reportErrorf(err2.Error())
reportErrorln(err2.Error())

Check warning on line 712 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L712

Added line #L712 was not covered by tests
}
}
} else {
Expand All @@ -719,7 +719,7 @@
err = writeTxnToFile(client, sign, dataDir, walletName, tx, outFilename)
}
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())

Check warning on line 722 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L722

Added line #L722 was not covered by tests
}
}
},
Expand Down Expand Up @@ -779,7 +779,7 @@
if !noWaitAfterSend {
_, err2 = waitForCommit(client, txid, lv)
if err2 != nil {
reportErrorf(err2.Error())
reportErrorln(err2.Error())

Check warning on line 782 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L782

Added line #L782 was not covered by tests
}
}
} else {
Expand All @@ -789,7 +789,7 @@
err = writeTxnToFile(client, sign, dataDir, walletName, tx, outFilename)
}
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())

Check warning on line 792 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L792

Added line #L792 was not covered by tests
}
}
},
Expand Down Expand Up @@ -849,7 +849,7 @@
if !noWaitAfterSend {
_, err2 = waitForCommit(client, txid, lv)
if err2 != nil {
reportErrorf(err2.Error())
reportErrorln(err2.Error())

Check warning on line 852 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L852

Added line #L852 was not covered by tests
}
}
} else {
Expand All @@ -859,7 +859,7 @@
err = writeTxnToFile(client, sign, dataDir, walletName, tx, outFilename)
}
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())

Check warning on line 862 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L862

Added line #L862 was not covered by tests
}
}
},
Expand Down Expand Up @@ -919,7 +919,7 @@
if !noWaitAfterSend {
_, err2 = waitForCommit(client, txid, lv)
if err2 != nil {
reportErrorf(err2.Error())
reportErrorln(err2.Error())

Check warning on line 922 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L922

Added line #L922 was not covered by tests
}
}
} else {
Expand All @@ -929,7 +929,7 @@
err = writeTxnToFile(client, sign, dataDir, walletName, tx, outFilename)
}
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())

Check warning on line 932 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L932

Added line #L932 was not covered by tests
}
}
},
Expand Down Expand Up @@ -1442,7 +1442,7 @@
err = writeSignedTxnsToFile(signedTxnGroup, outFilename)
}
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())

Check warning on line 1445 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L1445

Added line #L1445 was not covered by tests
}
return
}
Expand Down Expand Up @@ -1472,12 +1472,12 @@
if !noWaitAfterSend {
_, err := waitForCommit(client, txid, lv)
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())

Check warning on line 1475 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L1475

Added line #L1475 was not covered by tests
}

resp, err := client.PendingTransactionInformation(txid)
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())

Check warning on line 1480 in cmd/goal/application.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/application.go#L1480

Added line #L1480 was not covered by tests
}

if methodCreatesApp && resp.ApplicationIndex != nil && *resp.ApplicationIndex != 0 {
Expand Down
1 change: 0 additions & 1 deletion cmd/goal/application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ func TestParseMethodArgJSONtoByteSlice(t *testing.T) {
}

for i, test := range tests {
test := test
t.Run(fmt.Sprintf("index=%d", i), func(t *testing.T) {
t.Parallel()
applicationArgs := [][]byte{}
Expand Down
12 changes: 6 additions & 6 deletions cmd/goal/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@
if !noWaitAfterSend {
_, err2 = waitForCommit(client, txid, lastValid)
if err2 != nil {
reportErrorf(err2.Error())
reportErrorln(err2.Error())

Check warning on line 405 in cmd/goal/asset.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/asset.go#L405

Added line #L405 was not covered by tests
}
}
} else {
Expand Down Expand Up @@ -495,7 +495,7 @@
if !noWaitAfterSend {
_, err2 = waitForCommit(client, txid, lastValid)
if err2 != nil {
reportErrorf(err2.Error())
reportErrorln(err2.Error())

Check warning on line 498 in cmd/goal/asset.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/asset.go#L498

Added line #L498 was not covered by tests
}
}
} else {
Expand Down Expand Up @@ -582,7 +582,7 @@
if !noWaitAfterSend {
_, err2 = waitForCommit(client, txid, lastValid)
if err2 != nil {
reportErrorf(err2.Error())
reportErrorln(err2.Error())

Check warning on line 585 in cmd/goal/asset.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/asset.go#L585

Added line #L585 was not covered by tests
}
}
} else {
Expand Down Expand Up @@ -651,7 +651,7 @@
if !noWaitAfterSend {
_, err2 = waitForCommit(client, txid, lastValid)
if err2 != nil {
reportErrorf(err2.Error())
reportErrorln(err2.Error())

Check warning on line 654 in cmd/goal/asset.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/asset.go#L654

Added line #L654 was not covered by tests
}
}
} else {
Expand Down Expand Up @@ -740,13 +740,13 @@
if !noWaitAfterSend {
_, err2 = waitForCommit(client, txid, lastValid)
if err2 != nil {
reportErrorf(err2.Error())
reportErrorln(err2.Error())

Check warning on line 743 in cmd/goal/asset.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/asset.go#L743

Added line #L743 was not covered by tests
}
}
} else {
err = writeTxnToFile(client, sign, dataDir, walletName, tx, outFilename)
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())

Check warning on line 749 in cmd/goal/asset.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/asset.go#L749

Added line #L749 was not covered by tests
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions cmd/goal/clerk.go
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@
err = writeFile(outFilename, protocol.Encode(&stx), 0600)
}
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())

Check warning on line 559 in cmd/goal/clerk.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/clerk.go#L559

Added line #L559 was not covered by tests
}
}
},
Expand Down Expand Up @@ -1156,7 +1156,7 @@
client := ensureFullClient(dataDir)
accts, err := unmarshalSlice(dumpForDryrunAccts)
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())

Check warning on line 1159 in cmd/goal/clerk.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/clerk.go#L1159

Added line #L1159 was not covered by tests
}
data, err := libgoal.MakeDryrunStateBytes(client, nil, stxns, accts, string(proto), dumpForDryrunFormat.String())
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion cmd/goal/clerk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ func TestDeterminePathToSourceFromSourceMap(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()

Expand Down
4 changes: 2 additions & 2 deletions cmd/goal/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,11 +529,11 @@
proto, _ := getProto(protoVersion)
accts, err := unmarshalSlice(dumpForDryrunAccts)
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())

Check warning on line 532 in cmd/goal/commands.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/commands.go#L532

Added line #L532 was not covered by tests
}
data, err := libgoal.MakeDryrunStateBytes(client, txnOrStxn, []transactions.SignedTxn{}, accts, string(proto), dumpForDryrunFormat.String())
if err != nil {
reportErrorf(err.Error())
reportErrorln(err.Error())

Check warning on line 536 in cmd/goal/commands.go

View check run for this annotation

Codecov / codecov/patch

cmd/goal/commands.go#L536

Added line #L536 was not covered by tests
}
err = writeFile(outFilename, data, 0600)
return
Expand Down
1 change: 0 additions & 1 deletion cmd/goal/formatting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ func TestBytesToAppCallBytes(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.expected, func(t *testing.T) {
t.Parallel()
acb := encodeBytesAsAppCallBytes(tc.input)
Expand Down
1 change: 0 additions & 1 deletion cmd/goal/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ func TestGetMissingCatchpointLabel(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
t.Parallel()
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand Down
4 changes: 2 additions & 2 deletions cmd/loadgenerator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@
var handle db.Accessor
handle, err := db.MakeErasableAccessor(path)
if err != nil {
return nil //nolint:nilerr // don't care, move on
return nil

Check warning on line 72 in cmd/loadgenerator/main.go

View check run for this annotation

Codecov / codecov/patch

cmd/loadgenerator/main.go#L72

Added line #L72 was not covered by tests
}
defer handle.Close()

// Fetch an account.Participation from the database
root, err := algodAcct.RestoreRoot(handle)
if err != nil {
return nil //nolint:nilerr // don't care, move on
return nil

Check warning on line 79 in cmd/loadgenerator/main.go

View check run for this annotation

Codecov / codecov/patch

cmd/loadgenerator/main.go#L79

Added line #L79 was not covered by tests
}
keylist = append(keylist, root.Secrets())
return nil
Expand Down
Loading
Loading