Skip to content
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

Move code out of schema.resolvers.go because it's not linted #500

Open
omarkohl opened this issue May 24, 2023 · 2 comments
Open

Move code out of schema.resolvers.go because it's not linted #500

omarkohl opened this issue May 24, 2023 · 2 comments

Comments

@omarkohl
Copy link
Contributor

The file cleosrv/graph/schema.resolvers.go seems to be detected as auto-generated even though that is only partially true. golangci-lint automatically skips generated files and seems to give no recourse in this case (see golangci/golangci-lint#2864).

In addition some linters also impose restrictions e.g. gci has a skip-generated: true option which defaults to true.

The easiest solution for this is to ensure that the file contains as little code as possible and just calls external functions or methods in a path more clearly under our control.

@taraktikos
Copy link

You can use a flag to omit the comment

omit_gqlgen_file_notice

You can find it here:
99designs/gqlgen#2617

@omarkohl
Copy link
Contributor Author

You can use a flag to omit the comment

omit_gqlgen_file_notice

You can find it here: 99designs/gqlgen#2617

Thanks, good tip!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants