gnostic icon indicating copy to clipboard operation
gnostic copied to clipboard

Style issues in generated code

Open timburks opened this issue 5 years ago • 0 comments

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.

timburks avatar Apr 27 '20 20:04 timburks