cleodora icon indicating copy to clipboard operation
cleodora copied to clipboard

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

Open omarkohl opened this issue 2 years ago • 2 comments

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.

omarkohl avatar May 24 '23 07:05 omarkohl

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

taraktikos avatar Jan 30 '24 14:01 taraktikos

You can use a flag to omit the comment

omit_gqlgen_file_notice

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

Thanks, good tip!

omarkohl avatar Jan 30 '24 15:01 omarkohl