Skip to content

Can a function score 0 for its MVG measurement? #11

@JiahangLi

Description

@JiahangLi

I found bunches of functions have MVG scored 0 which is conflict to my understanding of the Cyclomatic Complexity.

Besides the original/formal formula to calculate the complexity by referencing to the control flow graph, we can also calculate it by counting the number of decision points and using MVG = D + 1; (D stands for the number of decision points). Therefore, by definition, a function with zero decision points still supposed to get MVG =1, as the lowest score possible as well.

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