Skip to content

refactor script to explicitly define truthy return values #8

Description

@wihobbs

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions