Opened 9 years ago

Closed 9 years ago

#25500 closed New feature (fixed)

Add option to check command to return non-zero exit status for warnings

Reported by: Jon Dufresne Owned by: nobody
Component: Core (Management commands) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I plan to use the system check command on a CI server to catch suspicious commits. Typically, the CI server will use the exit status to determine if a command fails or passes. I noticed the check command only exits with a non-zero exit status for ERROR issues. I suggest adding an option to the check command to either:

  • Treat warnings as errors, default to off
  • Set a minimum level to fail with an error, default to ERROR

I'm OK with either approach if Django maintainers have a preference.

This would be similar in spirit to gcc's -Werror option.

Change History (3)

comment:1 by Jon Dufresne, 9 years ago

Has patch: set

comment:2 by Simon Charette, 9 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In 28753258:

Fixed #25500 -- Added --fail-level option to check command.

This option specifies the level that check command exits with a
non-zero status. Default is ERROR.

Note: See TracTickets for help on using tickets.
Back to Top