This repository was archived by the owner on May 9, 2021. It is now read-only.
This repository was archived by the owner on May 9, 2021. It is now read-only.
Spurious 'if block ends with a return statement…' when some preceding if-else clauses don't return unconditionally. #382
Closed
Description
The following expression is flagged by golint, but requires the final else
:
$ golint -min_confidence 0 ./jsonnet
jsonnet/cmd.go:324:11: if block ends with a return statement, so drop this else and outdent its block
golint should verify that all preceding if
and if else
blocks return unconditionally, not just the immediately preceding one.
Metadata
Metadata
Assignees
Labels
No labels