gojp / goreportcard

A report card for your Go application
https://goreportcard.com
Apache License 2.0
2.01k stars 250 forks source link

under-reported `gocyclo`? #422

Open miparnisari opened 7 months ago

miparnisari commented 7 months ago

Compare

https://goreportcard.com/report/github.com/openfga/openfga

image

versus

[19/04/24 2:06:48] ~/GitHub/openfga (main) $ golangci-lint run -E gocyclo
pkg/server/errors/encoded_errors.go:129:1: cyclomatic complexity 35 of func `getCustomizedErrorCode` is high (> 30) (gocyclo)
func getCustomizedErrorCode(field string, reason string) int32 {
^
internal/graph/graph.go:204:1: cyclomatic complexity 38 of func `(*RelationshipGraph).getRelationshipEdgesWithTargetRewrite` is high (> 30) (gocyclo)
func (g *RelationshipGraph) getRelationshipEdgesWithTargetRewrite(
^
internal/server/config/config.go:252:1: cyclomatic complexity 34 of func `(*Config).Verify` is high (> 30) (gocyclo)
func (cfg *Config) Verify() error {
^
pkg/typesystem/typesystem.go:549:1: cyclomatic complexity 37 of func `hasEntrypoints` is high (> 30) (gocyclo)
func hasEntrypoints(
^
cmd/run/run.go:277:1: cyclomatic complexity 58 of func `(*ServerContext).Run` is high (> 30) (gocyclo)
func (s *ServerContext) Run(ctx context.Context, config *serverconfig.Config) error {
^
[19/04/24 2:06:50] ~/GitHub/openfga (main) $