Skip to content

Feature Request: Define exit code for warnings #1413

Description

@JuJup

Proposal

Add a --warning-exit-code=123 or similar option to define the exit code for warnings.

Background

If I understood correctly, react-doctor always exits with 0 or 1.
Per default, on errors it gives 1, otherwise it will return with 0. This can be changed by setting --blocking warning.

Now when running e.g. in GitLab CI, I set --blocking error(default), which fails the CI and therefore works as a quality gate. However, warnings are also important and should be handled optimally. However, I barely read the Job output when everything is green, so I won't notice them usually.

With the above option I could add this to my CI definition:

  allow_failure:
    exit_codes: 123

If errors are found, this will result in a Job with a Warning Symbol in my CI though not failing the CI and blocking the Merge.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions