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

Add test cases for IgnoreAssert extension #80

Closed rakhimov closed 8 years ago

rakhimov commented 8 years ago

This is additional tests for handling C/C++ asserts with an extension #79. The code should ignore complexity of any code inside assert.

Review on Reviewable

terryyin commented 8 years ago

I've passed the test and created a new release.

rakhimov commented 8 years ago

I think the current implementation is practical enough but not general. It is still failing to ignore any code complexity inside of assert. It is weird but possible to put "while, for, if, goto, switch, function, class, etc." through lambda.

terryyin commented 8 years ago

Hmm, I think if extremely complicated expression is used in assertion, probably it shouldn't be ignored:-)

rakhimov commented 8 years ago

I think consistency is better. It is hard to come up with and justify qualifications for the code inside of asserts, but with the extension approach, users can decide when not to ignore asserts.

terryyin commented 8 years ago

Good point.

And it should work with C/C++ code. Let me do it properly.

On 10 Jan 2016, at 9:17 PM, Olzhas Rakhimov notifications@github.com wrote:

I think consistency is better. It is hard to come up with and justify qualifications for the code inside of asserts, but with the extension approach, users can decide when not to ignore asserts.

— Reply to this email directly or view it on GitHub https://github.com/terryyin/lizard/pull/80#issuecomment-170343922.