cleodora
cleodora copied to clipboard
Move code out of schema.resolvers.go because it's not linted
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 https://github.com/golangci/golangci-lint/issues/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.
You can use a flag to omit the comment
omit_gqlgen_file_notice
You can find it here: https://github.com/99designs/gqlgen/pull/2617
You can use a flag to omit the comment
omit_gqlgen_file_noticeYou can find it here: 99designs/gqlgen#2617
Thanks, good tip!