Skip to content

Commit

Permalink
chore: enable nolintlint to lint //nolint directives
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear committed Nov 25, 2024
1 parent 0d5b25e commit 2409a2c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ linters:
- ineffassign
- misspell
- nakedret
- nolintlint
- perfsprint
- prealloc
- revive
Expand Down
2 changes: 1 addition & 1 deletion _examples/dataloader/dataloaders.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type loaders struct {
itemsByOrder *ItemSliceLoader
}

// nolint: gosec
//nolint:gosec
func LoaderMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ldrs := loaders{}
Expand Down
6 changes: 4 additions & 2 deletions _examples/dataloader/resolvers.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ func (r *queryResolver) Customers(ctx context.Context) ([]*Customer, error) {
}

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

// this method is here to test code generation of nested arrays
// nolint: gosec
//
//nolint:gosec
func (r *queryResolver) Torture2d(ctx context.Context, customerIds [][]int) ([][]*Customer, error) {
result := make([][]*Customer, len(customerIds))
for i := range customerIds {
Expand Down
2 changes: 1 addition & 1 deletion plugin/federation/test_data/model2/federation.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package model2

type FieldSet string //nolint:deadcode,unused
type FieldSet string //nolint:deadcode

type Hello struct {
Name string
Expand Down

0 comments on commit 2409a2c

Please sign in to comment.