[RFC] Return 1 when some code fails a rule
Issue #21
resolved
At the moment, vera++ prints errors to the stderr whenever some code fails a style check rule, but it still exits with a code of "0" which means "success".
I've been looking into veracpp-cmake to integrate vera++ checking of targets with the build process so that style check failures result in errors. At the moment, this isn't possible without an "interesting" Return 1 when child prints to stderr because vera++ doesn't return 0 on style check errors.
This is more of an RFC for whether or not vera++ should exit with a return code of "1" by default in that circumstance, and then obviously always with "0" if -nofail is passed. If thats fine, I'll submit a patch, its straightforward to do.
Comments (2)
-
-
- changed status to resolved
please reopen if this does not cover the need
- Log in to comment
I certainly agree with that! A similar feature was implemented a few days ago in b7f4da8 with a new --error option that put an "error: " string in the report and makes vera++ return a non zero value when at least one report is produced. Does that fill your needs?