Skip to content

CHECK outside of loop (CHECK 02) should be more smart  #1095

Open
@alezhu

Description

@alezhu

CHECK 02 does not allow CHECK for exit from block except loops. It required RETURN for this.
And it used Programming Guideline Only use RETURN to exit procedures) to justify it.

BUT! That guideline has Exception section:

An exception to the rule to only use RETURN to exit procedures are CHECK statements that are located at the beginning of a procedure and that check the prerequisites for the execution of the procedure there. Using the CHECK statement in such a way does not impair the legibility and is thus allowed. However, this exception does not apply to other positions within a procedure and outside loops.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions