Skip to content

Commit 359a385

Browse files
committed
build: golangci-lint v2.7.2
1 parent 21640d5 commit 359a385

File tree

141 files changed

+28
-188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+28
-188
lines changed

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
name: Dockerfile build
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
11+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1212
- name: Build the Docker image
1313
run: docker build -t decred/dcrlnd:$(date +%s) .
1414

.github/workflows/go.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@ jobs:
1212
go: ['1.24', '1.25']
1313
steps:
1414
- name: Set up Go
15-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #5.5.0
15+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
1616
with:
1717
go-version: ${{ matrix.go }}
1818

1919
- name: Check out source
2020
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
2121

22-
- name: Install Linters
23-
run: "go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8"
22+
- name: golangci-lint
23+
uses: golangci/golangci-lint-action@0a35821d5c230e903fcfe077583637dea1b27b47 # v9.0.0
24+
with:
25+
install-mode: "goinstall"
26+
version: 9f61b0f53f80672872fced07b6874397c3ed197b # v2.7.2
2427

2528
- name: Check golangci-lint version
2629
run: golangci-lint --version
@@ -30,7 +33,7 @@ jobs:
3033

3134
- name: Lint
3235
run: |
33-
golangci-lint run --out-format=github-actions
36+
golangci-lint run
3437
3538
- name: Package test binaries
3639
run: |
@@ -60,7 +63,7 @@ jobs:
6063
- itest-parallel-run walletimpl=remotewallet backend=spv # remote wallet spv sync
6164
steps:
6265
- name: Set up Go
63-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #5.5.0
66+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
6467
with:
6568
go-version: ${{ matrix.go }}
6669

.golangci.yml

Lines changed: 14 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,29 @@
1+
version: "2"
12
run:
2-
deadline: 10m
3-
3+
timeout: 10m
44
linters:
5-
# Skip autogenerated files for mobile and gRPC.
6-
skip-files:
7-
- "mobile\\/.*generated\\.go"
8-
- "\\.pb\\.go$"
9-
- "\\.pb\\.gw\\.go$"
10-
11-
disable-all: true
5+
default: none
126
enable:
137
- asciicheck
148
- bidichk
159
- bodyclose
1610
- errchkjson
17-
# - exportloopref
18-
- gofmt
19-
- gosimple
2011
- govet
2112
- grouper
2213
- ineffassign
2314
- nosprintfhostport
2415
- reassign
2516
- rowserrcheck
26-
- typecheck
2717
- unconvert
2818
- unused
29-
- vetshadow
30-
31-
issues:
32-
# Only show newly introduced problems.
33-
# new-from-rev: 01f696afce2f9c0d4ed854edefa3846891d01d8a
34-
35-
exclude-rules:
36-
# Exclude gosec from running for tests so that tests with weak randomness
37-
# (math/rand) will pass the linter.
38-
- path: _test\.go
39-
linters:
40-
- gosec
41-
42-
# Fix false positives because of build flags in itest directory.
43-
- path: lntest/itest/.*
44-
linters:
45-
- unused
46-
- deadcode
47-
- unparam
48-
- govet
49-
50-
# Ignore govet.lostcancel in integration test files. The
51-
# integration tests make substantial use of context.WithTimeout()
52-
# without corresponding cancel() calls, which trigger this. So
53-
# disable these warnings for now until this is fixed upstream
54-
# (otherwise merging upstream itest changes will become
55-
# significantly harder)
56-
- path: lntest/
57-
text: lostcancel
19+
exclusions:
20+
rules:
21+
- linters:
22+
- govet
23+
- unused
24+
path: lntest/itest/.*
25+
- path: lntest/
26+
text: lostcancel
27+
formatters:
28+
enable:
29+
- gofmt

build/deployment_dev.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build dev
2-
// +build dev
32

43
package build
54

build/deployment_prod.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build !dev
2-
// +build !dev
32

43
package build
54

build/log_default.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build !stdlog && !nolog && !filelog
2-
// +build !stdlog,!nolog,!filelog
32

43
package build
54

build/log_filelog.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build filelog
2-
// +build filelog
32

43
package build
54

build/log_nolog.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build nolog
2-
// +build nolog
32

43
package build
54

build/log_stdlog.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build stdlog
2-
// +build stdlog
32

43
package build
54

build/loglevel_critical.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build dev && critical
2-
// +build dev,critical
32

43
package build
54

0 commit comments

Comments
 (0)