cleodora-forecasting / cleodora-forecasting/cleodora

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

Open
#500 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
24
Forks
1
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start with cleosrv/graph/schema.resolvers.go and identify the code that is currently treated as generated. Move that code into an external path under project control, leaving the resolver file to delegate to it. Done means the resolver file contains as little logic as possible and the moved code is no longer skipped by the relevant linters.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, graphql
Domain
api, backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.