Skip to content

Nulish coalescence operator not adding to complexity #122

Description

@jjvggmv

When comparing the complexity calculation between the CodeMetrics plugin and sonar we saw a discrepance, sonar adds one point for each nullish coalescing operator inside conditional expressions while CodeMetrics only adds one point for the conditional expression:

Sonar:

Image

CodeMetrics:

Image

After discussing in our team we think this is a bug, but maybe it is on purpose. Could you confirm?

Thank you!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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