gnostic
gnostic copied to clipboard
Style issues in generated code
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.