question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NPath complexity overflow

See original GitHub issue

I think something went wrong with the NPath complexity calculation image

ResolveType method is really very complex and uses recursion, but the green color confuses.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
danielpalmecommented, Jan 20, 2019

I made a little change in ReportGenerator. Negative values are now converted to int.MaxValue.

0reactions
sungam3rcommented, Jan 20, 2019

I completely agree. But the meaning of this metric is such that it cannot take on negative values. That is, any consumer (ReportGenerator) of this metric can say with absolute certainty that an overflow has occurred and somehow notify about it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is NPath Complexity and how to avoid it?
The NPath complexity of a method is the number of acyclic execution paths through that method. This means you should avoid long functions...
Read more >
[java] NPath complexity false negative due to overflow #1226
Description: On some methods, the NPath complexity is not reported, even though the threshold for reporting it is set to the minimum value....
Read more >
Calculating NPath Complexity
The NPath Complexity is the sum of the possible routes through your code (ignoring cycles). The complexity therefore depends on the ...
Read more >
Cyclomatic Complexity of switch case statement
Cyclomatic Complexity of switch case statement – Stack Overflow ... Testing: A Testing Methodology Using the Cyclomatic Complexity Metric.
Read more >
Cyclomatic Complexity of multiple if statements
Meme Overflow · @overflow_meme. Cyclomatic Complexity of multiple if statements ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found