Skip to content

Commit 5babde5

Browse files
authored
chore: reenable revive.use-any and fix exlusion list (#3625)
1 parent 43a809b commit 5babde5

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

‎.golangci.yml‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ linters:
5353
enable-all-rules: false
5454
rules:
5555
- name: empty-lines
56-
# - name: use-any # this causes problems in some generated files
56+
- name: use-any
5757
- name: struct-tag
5858
- name: blank-imports
5959
- name: context-as-argument
@@ -114,12 +114,13 @@ linters:
114114
- linters:
115115
- gocritic
116116
path: _examples/federation/products/graph/entity.resolvers.go
117+
# revive.use-any causes problems in some generated files
117118
- path: graphql/map.go
118-
text: 'use-any: since GO 1.18 ''interface{}'' can be replaced by ''any'''
119+
text: 'use-any'
119120
- path: codegen/testserver/followschema/resolver.go
120-
text: 'use-any: since GO 1.18 ''interface{}'' can be replaced by ''any'''
121+
text: 'use-any'
121122
- path: codegen/testserver/singlefile/resolver.go
122-
text: 'use-any: since GO 1.18 ''interface{}'' can be replaced by ''any'''
123+
text: 'use-any'
123124
- linters:
124125
- staticcheck
125126
path: codegen/testserver/generated_test.go

‎plugin/federation/test_data/model/federation.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package model
22

3-
type _FieldSet string //nolint:deadcode,unused
3+
type _FieldSet string //nolint:unused
44

55
type Hello struct {
66
Name string

‎plugin/federation/test_data/model2/federation.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package model2
22

3-
type FieldSet string //nolint:deadcode
3+
type FieldSet string
44

55
type Hello struct {
66
Name string

‎plugin/federation/testdata/allthethings/model/federation.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package model
22

3-
type _FieldSet string //nolint:deadcode,unused
3+
type _FieldSet string //nolint:unused
44

55
type Hello struct {
66
Name string

0 commit comments

Comments
 (0)