File tree Expand file tree Collapse file tree 3 files changed +61
-1
lines changed Expand file tree Collapse file tree 3 files changed +61
-1
lines changed Original file line number Diff line number Diff line change 19
19
with :
20
20
go-version : " 1.24.x"
21
21
go-generate-ignore-protoc-version-comments : true
22
+
23
+ golangci-lint :
24
+ runs-on : ubuntu-latest
25
+ strategy :
26
+ fail-fast : false
27
+ matrix :
28
+ go : [ "1.23.x", "1.24.x" ]
29
+ env :
30
+ GOLANGCI_LINT_VERSION : v2.0.2
31
+ name : golangci-lint (Go ${{ matrix.go }})
32
+ steps :
33
+ - uses : actions/checkout@v4
34
+ - uses : actions/setup-go@v5
35
+ with :
36
+ go-version : ${{ matrix.go }}
37
+ - name : golangci-lint (Linux)
38
+ uses : golangci/golangci-lint-action@v7
39
+ with :
40
+ args : --timeout=5m
41
+ version : ${{ env.GOLANGCI_LINT_VERSION }}
42
+ only-new-issues : true
43
+ - name : golangci-lint (Windows)
44
+ if : success() || failure() # run this step even if the previous one failed
45
+ uses : golangci/golangci-lint-action@v7
46
+ env :
47
+ GOOS : " windows"
48
+ with :
49
+ args : --timeout=5m
50
+ version : ${{ env.GOLANGCI_LINT_VERSION }}
51
+ only-new-issues : true
52
+ - name : golangci-lint (OSX)
53
+ if : success() || failure() # run this step even if the previous one failed
54
+ uses : golangci/golangci-lint-action@v7
55
+ env :
56
+ GOOS : " darwin"
57
+ with :
58
+ args : --timeout=5m
59
+ version : ${{ env.GOLANGCI_LINT_VERSION }}
60
+ only-new-issues : true
Original file line number Diff line number Diff line change
1
+ version : " 2"
2
+
3
+ run :
4
+ timeout : 5m
5
+
6
+ linters :
7
+ enable :
8
+ - revive
9
+ - unused
10
+ - prealloc
11
+
12
+ settings :
13
+ revive :
14
+ severity : warning
15
+ rules :
16
+ - name : unused-parameter
17
+ severity : warning
18
+
19
+ severity :
20
+ default : warning
21
+
Original file line number Diff line number Diff line change @@ -442,7 +442,7 @@ func (r *rateLimiter) Accept(p peer.ID) bool {
442
442
return true
443
443
}
444
444
445
- func (r * rateLimiter ) AcceptDialDataRequest (p peer.ID ) bool {
445
+ func (r * rateLimiter ) AcceptDialDataRequest (px peer.ID ) bool {
446
446
r .mu .Lock ()
447
447
defer r .mu .Unlock ()
448
448
if r .closed {
You can’t perform that action at this time.
0 commit comments