Skip to content

Commit e12e318

Browse files
authored
Update golangci-lint to v2 (#40)
1 parent 83eae7b commit e12e318

File tree

4 files changed

+58
-46
lines changed

4 files changed

+58
-46
lines changed

Diff for: .github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
go-version: stable
3131

3232
- name: Lint Go
33-
uses: golangci/golangci-lint-action@v6
33+
uses: golangci/golangci-lint-action@v7
3434

3535
actionlint:
3636
name: Actionlint

Diff for: .golangci.yml

+55-41
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,6 @@
1-
linters-settings:
2-
misspell:
3-
locale: US
4-
revive:
5-
ignore-generated-header: true
6-
rules:
7-
- name: blank-imports
8-
- name: context-as-argument
9-
- name: context-keys-type
10-
- name: dot-imports
11-
- name: empty-block
12-
- name: error-naming
13-
- name: error-return
14-
- name: error-strings
15-
- name: errorf
16-
- name: exported
17-
- name: increment-decrement
18-
- name: indent-error-flow
19-
- name: package-comments
20-
- name: range
21-
- name: receiver-naming
22-
- name: redefines-builtin-id
23-
- name: superfluous-else
24-
- name: time-naming
25-
- name: unexported-return
26-
- name: unreachable-code
27-
- name: unused-parameter
28-
- name: var-declaration
29-
- name: var-naming
30-
govet:
31-
enable-all: true
1+
version: "2"
322
linters:
3+
default: none
334
enable:
345
- asasalint
356
- asciicheck
@@ -48,11 +19,7 @@ linters:
4819
- gochecksumtype
4920
- gocritic
5021
- godot
51-
- gofmt
52-
- gofumpt
53-
- goimports
5422
- gosec
55-
- gosimple
5623
- gosmopolitan
5724
- govet
5825
- ineffassign
@@ -70,22 +37,69 @@ linters:
7037
- reassign
7138
- revive
7239
- staticcheck
73-
- stylecheck
7440
- tagalign
75-
- tenv
7641
- thelper
7742
- tparallel
78-
- typecheck
7943
- unconvert
8044
- unparam
8145
- unused
8246
- usestdlibvars
8347
- wastedassign
8448
- whitespace
8549
# - wrapcheck
86-
disable-all: true
50+
settings:
51+
govet:
52+
enable-all: true
53+
misspell:
54+
locale: US
55+
revive:
56+
rules:
57+
- name: blank-imports
58+
- name: context-as-argument
59+
- name: context-keys-type
60+
- name: dot-imports
61+
- name: empty-block
62+
- name: error-naming
63+
- name: error-return
64+
- name: error-strings
65+
- name: errorf
66+
- name: exported
67+
- name: increment-decrement
68+
- name: indent-error-flow
69+
- name: package-comments
70+
- name: range
71+
- name: receiver-naming
72+
- name: redefines-builtin-id
73+
- name: superfluous-else
74+
- name: time-naming
75+
- name: unexported-return
76+
- name: unreachable-code
77+
- name: unused-parameter
78+
- name: var-declaration
79+
- name: var-naming
80+
exclusions:
81+
generated: lax
82+
presets:
83+
- comments
84+
- common-false-positives
85+
- legacy
86+
- std-error-handling
87+
paths:
88+
- third_party$
89+
- builtin$
90+
- examples$
8791
issues:
8892
max-issues-per-linter: 0
8993
max-same-issues: 0
90-
run:
91-
timeout: 5m
94+
formatters:
95+
enable:
96+
- gci
97+
- gofmt
98+
- gofumpt
99+
- goimports
100+
exclusions:
101+
generated: lax
102+
paths:
103+
- third_party$
104+
- builtin$
105+
- examples$

Diff for: errors_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ package otgrpc
33
import (
44
"testing"
55

6-
"github.com/stretchr/testify/assert"
7-
86
"github.com/opentracing/opentracing-go/mocktracer"
7+
"github.com/stretchr/testify/assert"
98
"google.golang.org/grpc/codes"
109
"google.golang.org/grpc/status"
1110
)

Diff for: test/interceptor_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ import (
88
"testing"
99
"time"
1010

11-
"github.com/stretchr/testify/assert"
12-
1311
otgrpc "github.com/opentracing-contrib/go-grpc"
1412
testpb "github.com/opentracing-contrib/go-grpc/test/otgrpc_testing"
1513
"github.com/opentracing/opentracing-go/mocktracer"
14+
"github.com/stretchr/testify/assert"
1615
"google.golang.org/grpc"
1716
"google.golang.org/grpc/credentials/insecure"
1817
)

0 commit comments

Comments
 (0)