Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Cognitive Complexity Metric to detect recursion correctly #851

Closed
valhristov opened this issue Oct 19, 2017 · 0 comments
Closed

Fix Cognitive Complexity Metric to detect recursion correctly #851

valhristov opened this issue Oct 19, 2017 · 0 comments
Assignees
Labels
Type: Improvement Making existing code better.
Milestone

Comments

@valhristov
Copy link
Contributor

valhristov commented Oct 19, 2017

Description

Cognitive Complexity Metric does not detect recursion correctly

Repro steps

The following method has secondary location that says Recursion, but it is wrong, since the called method has 4 arguments:

https://sonarcloud.io/project/issues?id=opencover&issues=AVtqmsZxpeB1ugsgQfin&open=AVtqmsZxpeB1ugsgQfin

Expected behavior

Recursion is not detected.

Actual behavior

Recursion is detected (FP).

Known workarounds

None.

Related information

  • 6.4.1
@valhristov valhristov added Area: Metrics Type: False Positive Rule IS triggered when it shouldn't be. labels Oct 19, 2017
@valhristov valhristov added this to the 6.6 milestone Oct 19, 2017
@valhristov valhristov self-assigned this Oct 20, 2017
@Evangelink Evangelink changed the title Cognitive Complexity Metric does not detect recursion correctly Fix Cognitive Complexity Metric to detect recursion correctly Nov 7, 2017
@Evangelink Evangelink added Type: Improvement Making existing code better. and removed Type: False Positive Rule IS triggered when it shouldn't be. labels Nov 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Improvement Making existing code better.
Projects
None yet
Development

No branches or pull requests

2 participants