-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues in gqlgen resolvers are ignored #4506
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Hello, the comment says that the file is generated, I understand that is partially but the comment applies to the file. |
Yeah, sorry - this is maybe more of a feature request than a bug. I'm looking for a way to make sure these Would you be open to a PR that adds a configuration flag to skip |
Take a look at #4507 |
@bnavetta While the golangci-lint team is working on a proper fix, I suggest you try the following solution. A potential workaround is to set
You can read about the |
This looks great, thanks!
Ah, thank you - didn't know that was an option. |
Welcome
Description of the problem
I'm using gqlgen to implement a GraphQL server. It autogenerates stubs for GraphQL endpoints, in
*.resolver.go
files. Even though the stubs are autogenerated, the files have non-autogenerated code.golangci-lint run
ignores issues in these files. Based on the verbose output, I think they're getting filtered out by theautogenerated_exclude
processor.Each resolver file has a comment like this:
I think that's triggering the rule here, even though the rest of the file isn't autogenerated.
Version of golangci-lint
Configuration
Go environment
Verbose output of running
Running `exhaustruct` directly:
A minimal reproducible example or link to a public repository
See https://github.com/bnavetta/gqlgen-linting
The code that should be reported is here: https://github.com/bnavetta/gqlgen-linting/blob/2f18e1ecca7cffa1030a12aa10d5af4e1ce49de4/graph/schema.resolvers.go#L21-L24
Validation
The text was updated successfully, but these errors were encountered: