From 75861bc6171e1c7e3ff454fdb0c77db783d67695 Mon Sep 17 00:00:00 2001 From: Kaloyan Raev Date: Tue, 12 May 2026 13:13:23 +0300 Subject: [PATCH 1/3] Fix golangci-lint config incompatibilities with v1.61 Remove or fix linter settings that are no longer accepted by the golangci-lint v1.61 config schema, which caused CI to fail on config verification: - Remove govet.use-installed-packages - Remove goimports settings block - Remove golint settings block (linter was removed from golangci-lint) - Fix misspell bare null value to empty object - Remove unused.check-exported - Remove unparam settings block --- .golangci.yml | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 5ccca1f..5583bd6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -104,22 +104,9 @@ linters-settings: govet: # report about shadowed variables #TODO# check-shadowing: true - - # Obtain type information from installed (to $GOPATH/pkg) package files: - # golangci-lint will execute `go install -i` and `go test -i` for analyzed packages - # before analyzing them. - # Enable this option only if all conditions are met: - # 1. you use only "fast" linters (--fast e.g.): no program loading occurs - # 2. you use go >= 1.10 - # 3. you do repeated runs (false for CI) or cache $GOPATH/pkg or `go env GOCACHE` dir in CI. - use-installed-packages: false gocritic: disabled-checks: - ifElseChain - goimports: - local: "storj.io" - golint: - min-confidence: 0.8 gofmt: simplify: true gocyclo: @@ -129,26 +116,10 @@ linters-settings: goconst: min-len: 3 min-occurrences: 3 - misspell: + misspell: {} lll: line-length: 140 tab-width: 1 - unused: - # treat code as a program (not a library) and report unused exported identifiers; default is false. - # XXX: if you enable this setting, unused will report a lot of false-positives in text editors: - # if it's called for subdir of a project it can't find funcs usages. All text editor integrations - # with golangci-lint call it on a directory with the changed file. - check-exported: false - unparam: - # call graph construction algorithm (cha, rta). In general, use cha for libraries, - # and rta for programs with main packages. Default is cha. - algo: cha - - # Inspect exported functions, default is false. Set to true if no external program/library imports your code. - # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors: - # if it's called for subdir of a project it can't find external interfaces. All text editor integrations - # with golangci-lint call it on a directory with the changed file. - check-exported: false nakedret: # make an issue if func has more lines of code than this setting and it has naked returns; default is 30 max-func-lines: 30 From 6f5a8ff2c16b5bde5fc0611498bd639bced83788 Mon Sep 17 00:00:00 2001 From: Kaloyan Raev Date: Tue, 12 May 2026 13:17:58 +0300 Subject: [PATCH 2/3] Fix govet --- .golangci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 5583bd6..d35df74 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -101,9 +101,7 @@ linters-settings: # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; # default is false: such cases aren't reported by default. check-blank: false - govet: - # report about shadowed variables - #TODO# check-shadowing: true + govet: {} gocritic: disabled-checks: - ifElseChain From 17b8330fb207fb32053b9ae0ecd81ae155b62aa8 Mon Sep 17 00:00:00 2001 From: Kaloyan Raev Date: Tue, 12 May 2026 13:22:08 +0300 Subject: [PATCH 3/3] Fix receiver naming lint error --- pkg/eth/units.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/eth/units.go b/pkg/eth/units.go index 8978798..b28b58a 100644 --- a/pkg/eth/units.go +++ b/pkg/eth/units.go @@ -124,16 +124,16 @@ func (u Unit) WEIInt() *big.Int { return u.wei.BigInt() } -func (a Unit) MarshalText() ([]byte, error) { - return []byte(a.String()), nil +func (u Unit) MarshalText() ([]byte, error) { + return []byte(u.String()), nil } -func (a *Unit) UnmarshalText(input []byte) error { +func (u *Unit) UnmarshalText(input []byte) error { p, err := ParseUnit(string(input)) if err != nil { return err } - *a = p + *u = p return nil }