Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
6 changes: 3 additions & 3 deletions .github/workflows/beekeeper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ jobs:
msg: ${{ steps.commit.outputs.msg }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
if: github.event.action != 'beekeeper'
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
if: github.event.action == 'beekeeper'
with:
fetch-depth: 0
ref: ${{ github.event.client_payload.ref }}
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
cache: false
go-version-file: go.mod
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: '0'
- name: Check whether docs have changed
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
cache: true
go-version-file: go.mod
Expand All @@ -41,9 +41,9 @@ jobs:
continue-on-error: ${{ github.ref == 'refs/heads/master' }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
cache: true
go-version-file: go.mod
Expand All @@ -55,22 +55,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
cache: false
go-version-file: go.mod
- name: Commit linting
if: github.ref != 'refs/heads/master'
uses: wagoid/commitlint-github-action@v5
- name: GolangCI-Lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v8
with:
skip-cache: false
version: v1.64.5
version: v2.5.0
- name: Whitespace check
run: make check-whitespace
- name: go mod tidy check
Expand All @@ -81,9 +81,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
cache: false
go-version-file: go.mod
Expand All @@ -109,11 +109,11 @@ jobs:
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
cache: false
go-version-file: go.mod
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Docker Hub and Quay Login
Expand Down
75 changes: 75 additions & 0 deletions .golangci.bck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
run:
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
108 changes: 57 additions & 51 deletions .golangci.yml
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$
2 changes: 1 addition & 1 deletion Dockerfile
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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
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

ARG REACHABILITY_OVERRIDE_PUBLIC=false
ARG BATCHFACTOR_OVERRIDE_PUBLIC=5
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GO ?= go
GOBIN ?= $$($(GO) env GOPATH)/bin
GOLANGCI_LINT ?= $(GOBIN)/golangci-lint
GOLANGCI_LINT_VERSION ?= v1.64.5
GOLANGCI_LINT_VERSION ?= v2.5.0
GOGOPROTOBUF ?= protoc-gen-gogofaster
GOGOPROTOBUF_VERSION ?= v1.3.1
BEEKEEPER_INSTALL_DIR ?= $(GOBIN)
Expand Down
4 changes: 2 additions & 2 deletions cmd/bee/cmd/split.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ func splitRefs(cmd *cobra.Command) {
}

logger.Debug("write root", "hash", rootRef)
_, err = writer.WriteString(fmt.Sprintf("%s\n", rootRef))
_, err = fmt.Fprintf(writer, "%s\n", rootRef)
if err != nil {
return fmt.Errorf("write root hash: %w", err)
}
for _, ref := range refs {
logger.Debug("write chunk", "hash", ref)
_, err = writer.WriteString(fmt.Sprintf("%s\n", ref))
_, err = fmt.Fprintf(writer, "%s\n", ref)
if err != nil {
return fmt.Errorf("write chunk address: %w", err)
}
Expand Down
Loading
Loading