terryyin / lizard

A simple code complexity analyser without caring about the C/C++ header files or Java imports, supports most of the popular languages.
Other
1.85k stars 250 forks source link

Nested depth #257

Closed elmotec closed 5 years ago

elmotec commented 5 years ago

That's the last pull request for issue #254. I believe it fixes the max_nested_depth value at the cost of stopping the special handling of for (;;). The other 2 are just fixing the test suite.

elmotec commented 5 years ago

Ah! Just realized I had a broken test when I pulled your new master. I made the test pass but it's more a workaround than a fix.

We go through the same logic for C and Python so code like int fun(){if(a){def;}} is going to create an unwanted level of nesting in C (not ok) as if it were Python code. Not sure what the right way to fix that?