In the pr-validator, because of the naming convention, a problem in the commit is a truthy return value in the existing functions (e.g. for is_body_empty(), body_line_length_exceeds() etc.).
This is further confused by the fact that 0 is "success" and non-zero is failure I think. Perhaps we should define:
EXIT_SUCCESS=0
EXIT_FAILURE=1
At the top of check-pr-commits.sh and switch all the functions to use these variables instead of explicit 0 and 1 as an improvement for future developers.
Originally posted by @grondo in #7 (comment)
In the pr-validator, because of the naming convention, a problem in the commit is a truthy return value in the existing functions (e.g. for
is_body_empty(),body_line_length_exceeds()etc.).This is further confused by the fact that
0is "success" and non-zero is failure I think. Perhaps we should define:At the top of
check-pr-commits.shand switch all the functions to use these variables instead of explicit0and1as an improvement for future developers.Originally posted by @grondo in #7 (comment)