Skip to content

Support switch complexity #11

@richierocks

Description

@richierocks

I expected this to return 6, but I get 1:

cyclocomp(quote(switch("e", a = 1, b = 2, c = 3, d = 4, e = 5, 6)))

I think calls to switch ought to return the number of non-missing elements of ....

In this example, a and b resolve to the same thing, so there are only 2 paths through the code:

switch("a", a = , b = 2, c = 3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions