google / google/gnostic

Style issues in generated code

Open
#167 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.3k
Forks
279
PR merge metrics
No merged PRs in 30d

Description

Noted by @noahdietz in comments on #166:

- https://github.com/googleapis/gnostic/pull/166#discussion_r415920689
Suggestion: put a return in this conditional block. `return x, compiler.NewErrorGroupOrNil(errors)`. This keeps the error flow indented but the following "green path" code path in the else at minimal indentation. Context: https://github.com/golang/go/wiki/CodeReviewComments#indent-error-flow

- https://github.com/googleapis/gnostic/pull/166#discussion_r415922830
Suggestion: put a continue in a !ok conditional rather than have the "green path" code be indented.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.