-
Notifications
You must be signed in to change notification settings - Fork 381
chore: bump golang to v1.25.1 and golangci-lint to v2 #5231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a92fe09
chore: update Go version to 1.25.0 in go.mod
akrem-chabchoub a1513f2
chore: update Go version to 1.25 in Dockerfiles
akrem-chabchoub fe8a032
chore: update golangci-lint to version 2.5.0
akrem-chabchoub fa3e5a4
chore: update Go toolchain to version 1.25.1 in go.mod
akrem-chabchoub 1106f86
chore: upgrade actions/checkout to v5 and actions/setup-go to v6 acro…
akrem-chabchoub 996a76e
chore: replace deprecated context import with standard context packag…
akrem-chabchoub 553a201
fix: fix lint issues and update golangci-lint configuration
akrem-chabchoub 9b1f71a
chore: update golang.org/x/net to v0.38.0 as an indirect dependency i…
akrem-chabchoub c104a43
fix: add metadata size overflow check in fork bytes method
akrem-chabchoub 333aea6
fix: move golang.org/x/net v0.38.0 to the indirect section in go.mod
akrem-chabchoub 0bad6bd
chore: remove unnecessary golangci backup file
akrem-chabchoub cb7fc22
chore: update base image in Dockerfile.goreleaser and Dockerfile.scra…
akrem-chabchoub 145f6af
chore: update BEEKEEPER_BRANCH to golangci-lint-v2 in beekeeper.yml (…
akrem-chabchoub ef72dc1
chore: update BEEKEEPER_BRANCH to master in beekeeper.yml
akrem-chabchoub File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| run: | ||
akrem-chabchoub marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| timeout: 10m | ||
| linters: | ||
| enable: | ||
| - asciicheck | ||
| - bidichk | ||
| - copyloopvar | ||
| - dogsled | ||
| - durationcheck | ||
| - errcheck | ||
| - errname | ||
| - errorlint | ||
| - forbidigo | ||
| - gochecknoinits | ||
| - goconst | ||
| - gofmt | ||
| - goheader | ||
| - goprintffuncname | ||
| - gosimple | ||
| - govet | ||
| - importas | ||
| - ineffassign | ||
| - misspell | ||
| - nilerr | ||
| - noctx | ||
| - paralleltest | ||
| - prealloc | ||
| - predeclared | ||
| - promlinter | ||
| - staticcheck | ||
| - thelper | ||
| - typecheck | ||
| - unconvert | ||
| - unused | ||
| # - depguard disable temporary until this issue is resolved: https://github.com/golangci/golangci-lint/issues/3906 | ||
|
|
||
| linters-settings: | ||
| govet: | ||
| enable-all: true | ||
| disable: | ||
| - fieldalignment ## temporally disabled | ||
| - shadow ## temporally disabled | ||
| goheader: | ||
| values: | ||
| regexp: | ||
| date: "20[1-2][0-9]" | ||
| template: |- | ||
| Copyright {{date}} The Swarm Authors. All rights reserved. | ||
| Use of this source code is governed by a BSD-style | ||
| license that can be found in the LICENSE file. | ||
| paralleltest: | ||
| # Ignore missing calls to `t.Parallel()` and only report incorrect uses of `t.Parallel()`. | ||
| ignore-missing: true | ||
| issues: | ||
| exclude-rules: | ||
| - linters: | ||
| - goheader | ||
| text: "go-ethereum Authors" ## disable check for other authors | ||
| - path: _test\.go | ||
| linters: | ||
| - goconst ## temporally disable goconst in test | ||
| - linters: | ||
| - forbidigo | ||
| path: cmd/bee/cmd | ||
| text: "use of `fmt.Print" ## allow fmt.Print in cmd directory | ||
| - linters: | ||
| - dogsled | ||
| path: pkg/api/(.+)_test\.go # temporally disable dogsled in api test files | ||
| - linters: | ||
| - dogsled | ||
| path: pkg/pushsync/(.+)_test\.go # temporally disable dogsled in pushsync test files | ||
| # temporally disable paralleltest in following packages | ||
| - linters: | ||
| - paralleltest | ||
| path: pkg/log | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,75 +1,81 @@ | ||
| run: | ||
| timeout: 10m | ||
| version: "2" | ||
| linters: | ||
| enable: | ||
| - asciicheck | ||
| - bidichk | ||
| - copyloopvar | ||
| - dogsled | ||
| - durationcheck | ||
| - errcheck | ||
| - errname | ||
| - errorlint | ||
| - forbidigo | ||
| - gochecknoinits | ||
| - goconst | ||
| - gofmt | ||
| - goheader | ||
| - goprintffuncname | ||
| - gosimple | ||
| - govet | ||
| - importas | ||
| - ineffassign | ||
| - misspell | ||
| - nilerr | ||
| - noctx | ||
| - paralleltest | ||
| - prealloc | ||
| - predeclared | ||
| - promlinter | ||
| - staticcheck | ||
| - thelper | ||
| - typecheck | ||
| - unconvert | ||
| - unused | ||
| # - depguard disable temporary until this issue is resolved: https://github.com/golangci/golangci-lint/issues/3906 | ||
|
|
||
| linters-settings: | ||
| govet: | ||
| enable-all: true | ||
| disable: | ||
| - fieldalignment ## temporally disabled | ||
| - shadow ## temporally disabled | ||
| goheader: | ||
| values: | ||
| regexp: | ||
| date: "20[1-2][0-9]" | ||
| template: |- | ||
| Copyright {{date}} The Swarm Authors. All rights reserved. | ||
| Use of this source code is governed by a BSD-style | ||
| license that can be found in the LICENSE file. | ||
| paralleltest: | ||
| # Ignore missing calls to `t.Parallel()` and only report incorrect uses of `t.Parallel()`. | ||
| ignore-missing: true | ||
| issues: | ||
| exclude-rules: | ||
| - linters: | ||
| - goheader | ||
| text: "go-ethereum Authors" ## disable check for other authors | ||
| - path: _test\.go | ||
| linters: | ||
| - goconst ## temporally disable goconst in test | ||
| - linters: | ||
| - forbidigo | ||
| path: cmd/bee/cmd | ||
| text: "use of `fmt.Print" ## allow fmt.Print in cmd directory | ||
| - linters: | ||
| - dogsled | ||
| path: pkg/api/(.+)_test\.go # temporally disable dogsled in api test files | ||
| - linters: | ||
| - dogsled | ||
| path: pkg/pushsync/(.+)_test\.go # temporally disable dogsled in pushsync test files | ||
| # temporally disable paralleltest in following packages | ||
| - linters: | ||
| - paralleltest | ||
| path: pkg/log | ||
| settings: | ||
| goheader: | ||
| values: | ||
| regexp: | ||
| date: 20[1-2][0-9] | ||
| template: |- | ||
| Copyright {{date}} The Swarm Authors. All rights reserved. | ||
| Use of this source code is governed by a BSD-style | ||
| license that can be found in the LICENSE file. | ||
| govet: | ||
| disable: | ||
| - fieldalignment | ||
| - shadow | ||
| enable-all: true | ||
| paralleltest: | ||
| ignore-missing: true | ||
| exclusions: | ||
| generated: lax | ||
| presets: | ||
| - comments | ||
| - common-false-positives | ||
| - legacy | ||
| - std-error-handling | ||
| rules: | ||
| - linters: | ||
| - goheader | ||
| text: go-ethereum Authors | ||
| - linters: | ||
| - goconst | ||
| path: _test\.go | ||
| - linters: | ||
| - forbidigo | ||
| path: cmd/bee/cmd | ||
| text: use of `fmt.Print | ||
| - linters: | ||
| - dogsled | ||
| path: pkg/api/(.+)_test\.go | ||
| - linters: | ||
| - dogsled | ||
| path: pkg/pushsync/(.+)_test\.go | ||
| - linters: | ||
| - paralleltest | ||
| path: pkg/log | ||
| paths: | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ | ||
| formatters: | ||
| enable: | ||
| - gofmt | ||
| exclusions: | ||
| generated: lax | ||
| paths: | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| FROM golang:1.24 AS build | ||
| FROM golang:1.25 AS build | ||
|
|
||
| WORKDIR /src | ||
| # enable modules caching in separate layer | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.