Skip to content

Commit 04f77c4

Browse files
authored
chore: enable nolintlint to lint //nolint directives (#3391)
1 parent 0d5b25e commit 04f77c4

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

‎.golangci.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ linters:
8686
- ineffassign
8787
- misspell
8888
- nakedret
89+
- nolintlint
8990
- perfsprint
9091
- prealloc
9192
- revive

‎_examples/dataloader/dataloaders.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type loaders struct {
2424
itemsByOrder *ItemSliceLoader
2525
}
2626

27-
// nolint: gosec
27+
//nolint:gosec
2828
func LoaderMiddleware(next http.Handler) http.Handler {
2929
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
3030
ldrs := loaders{}

‎_examples/dataloader/resolvers.go‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ func (r *queryResolver) Customers(ctx context.Context) ([]*Customer, error) {
6767
}
6868

6969
// this method is here to test code generation of nested arrays
70-
// nolint: gosec
70+
//
71+
//nolint:gosec
7172
func (r *queryResolver) Torture1d(ctx context.Context, customerIds []int) ([]*Customer, error) {
7273
result := make([]*Customer, len(customerIds))
7374
for i, id := range customerIds {
@@ -77,7 +78,8 @@ func (r *queryResolver) Torture1d(ctx context.Context, customerIds []int) ([]*Cu
7778
}
7879

7980
// this method is here to test code generation of nested arrays
80-
// nolint: gosec
81+
//
82+
//nolint:gosec
8183
func (r *queryResolver) Torture2d(ctx context.Context, customerIds [][]int) ([][]*Customer, error) {
8284
result := make([][]*Customer, len(customerIds))
8385
for i := range customerIds {

‎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,unused
3+
type FieldSet string //nolint:deadcode
44

55
type Hello struct {
66
Name string

0 commit comments

Comments
 (0)