Skip to content

Commit

Permalink
feat(rules): Fix linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
ldebruijn committed Sep 13, 2024
1 parent bfe24f4 commit 70bd43e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion validator/rules/fields_on_correct_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func init() {
}

addError(
Message(message),
Message(message), // nolint:govet
At(field.Position),
)
})
Expand Down
4 changes: 2 additions & 2 deletions validator/rules/fragments_on_composite_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func init() {
message := fmt.Sprintf(`Fragment cannot condition on non composite type "%s".`, inlineFragment.TypeCondition)

addError(
Message(message),
Message(message), // nolint:govet
At(inlineFragment.Position),
)
})
Expand All @@ -33,7 +33,7 @@ func init() {
message := fmt.Sprintf(`Fragment "%s" cannot condition on non composite type "%s".`, fragment.Name, fragment.TypeCondition)

addError(
Message(message),
Message(message), // nolint:govet
At(fragment.Position),
)
})
Expand Down
2 changes: 1 addition & 1 deletion validator/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func AddRule(name string, f ruleFunc) {
}

func RemoveRule(name string) {
result := make([]rule, len(rules))
var result []rule // nolint:prealloc // using initialized with len(rules) produces a race condition
for _, r := range rules {
if r.name == name {
continue
Expand Down

0 comments on commit 70bd43e

Please sign in to comment.