Skip to content
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
@marcelocantos

Description

@marcelocantos

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

image

golint should verify that all preceding if and if else blocks return unconditionally, not just the immediately preceding one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions