Skip to content

new rule: ensure else is the last case in a switch if present #27

@nektro

Description

@nektro
test {
    const E = enum { a, b, c };
    const a = E.a;

    switch (a) {
        .a => {},
        else => {},
        .c => {},
    }
}

report should point to test.zig:7:9:

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