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.81k stars 246 forks source link

Allow for failing cases to be printed to stderr #383

Open mitchgrout opened 9 months ago

mitchgrout commented 9 months ago

Currently all of the content is printed to stdout, including the final list of failing cases. This causes some issues with other tooling like meson, in which we might want to run lizard as a build target, like...

custom_target('lizard', command: ..., capture: true)

If we have any failures, lizard will exit with a non-zero code, which meson then uses to break the build. meson will then print out the stderr contents to help the user diagnose what went wrong, but in this case that's empty. It would be convenient to pass in an option which causes the final failures summary to be printed to stderr instead, so that cases like the above would integrate nicely.