[Django] #25500: Add option to check command to return non-zero exit status for warnings

12 views
Skip to first unread message

Django

unread,
Oct 3, 2015, 6:59:16 PM10/3/15
to django-...@googlegroups.com
#25500: Add option to check command to return non-zero exit status for warnings
--------------------------------------------+--------------------
Reporter: jdufresne | Owner: nobody
Type: New feature | Status: new
Component: Core (Management commands) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------------+--------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/25500>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 4, 2015, 2:20:00 PM10/4/15
to django-...@googlegroups.com
#25500: Add option to check command to return non-zero exit status for warnings
-------------------------------------+-------------------------------------

Reporter: jdufresne | Owner: nobody
Type: New feature | Status: new
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by jdufresne):

* needs_better_patch: => 0
* has_patch: 0 => 1
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/25500#comment:1>

Django

unread,
Oct 4, 2015, 2:24:05 PM10/4/15
to django-...@googlegroups.com
#25500: Add option to check command to return non-zero exit status for warnings
-------------------------------------+-------------------------------------

Reporter: jdufresne | Owner: nobody
Type: New feature | Status: new
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by charettes):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/25500#comment:2>

Django

unread,
Oct 5, 2015, 5:12:04 PM10/5/15
to django-...@googlegroups.com
#25500: Add option to check command to return non-zero exit status for warnings
-------------------------------------+-------------------------------------
Reporter: jdufresne | Owner: nobody
Type: New feature | Status: closed

Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"287532588941d2941e19c4cd069bcbd8af889203" 28753258]:
{{{
#!CommitTicketReference repository=""
revision="287532588941d2941e19c4cd069bcbd8af889203"
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``.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25500#comment:3>

Reply all
Reply to author
Forward
0 new messages