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
30 changes: 14 additions & 16 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v5

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v6
with:
go-version: ^1.21
id: go
go-version: ^1.24

- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Download dependencies
run: go mod download

- name: Run unit tests and generate the coverage report
run: make test-race
Expand All @@ -27,26 +29,22 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v5

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v6
with:
go-version: ^1.21
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
go-version: ^1.24

- name: Install gofumpt
run: go install mvdan.cc/gofumpt@v0.4.0

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@v0.5.1
run: go install honnef.co/go/tools/cmd/staticcheck@2025.1.1

- name: Install golangci-lint
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0

- name: Install NilAway
run: go install go.uber.org/nilaway/cmd/nilaway@v0.0.0-20240821220108-c91e71c080b7
run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.2

- name: Lint
run: make lint
Expand Down
21 changes: 17 additions & 4 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
version: "2"
linters:
enable-all: true
disable:
- cyclop
- forbidigo
- funlen
- gci
- gochecknoglobals
- gochecknoinits
- gocritic
- godot
- godox
- gomnd
- mnd
- lll
- nestif
Expand Down Expand Up @@ -40,8 +39,6 @@ linters:
#
# Disabled because deprecated:
#
- execinquery
- exportloopref

linters-settings:
#
Expand Down Expand Up @@ -89,3 +86,19 @@ linters-settings:
- 'MockBeaconClient'
- 'RelayAPI'
- 'Webserver'

formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
settings:
gofumpt:
extra-rules: true
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
2 changes: 1 addition & 1 deletion cmd/https-client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func runCli(cCtx *cli.Context) error {
log.Error("http request error", "err", err)
return err
}
defer resp.Body.Close()
defer resp.Body.Close() //nolint:errcheck

respBody, err := io.ReadAll(resp.Body)
if err != nil {
Expand Down