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

sys.exit(1) not called when "warnings only" enabled #87

Closed pricemi115 closed 8 years ago

pricemi115 commented 8 years ago

When invoking lizard via a command prompt on Windows, the Error level is not set to 1 when warnings are found, but the --warnings_only argument is specified.

Looking at the script, it appears that since print_result() is not called, the error condition is never set. Probably need to set "sys.exit(1)" in print_clang_style_warning() as well.

terryyin commented 8 years ago

Oops, this is a major problem from last time I refactored the code. Obviously I didn't have enough test.

Thanks. Fixing...

terryyin commented 8 years ago

OK. Now it's fixed in the latest release.

pricemi115 commented 8 years ago

Fantastic !! Thank you :)

On Jan 28, 2016, at 10:26 PM, Terry Yin notifications@github.com wrote:

OK. Now it's fixed in the latest release.

— Reply to this email directly or view it on GitHub https://github.com/terryyin/lizard/issues/87#issuecomment-176551788.

pricemi115 commented 8 years ago

Hi Terry:

Just wanted to let you know that v1.9.25 addresses both issues: the new threshold features and the --warnings_only issue.

Thank you very much!!

Take care, Mike Price.

Sent from my iPhone

On Jan 28, 2016, at 10:26 PM, Terry Yin notifications@github.com wrote:

OK. Now it's fixed in the latest release.

— Reply to this email directly or view it on GitHub.

terryyin commented 8 years ago

Great:-)