Skip to content

Let warnings cause the build to fail but not to terminate #3627

Closed

Description

@anntzer

Subject: sphinx-build should be able to treat warnings as errors without immediately terminating the build

Problem

sphinx-build should gain a switch that allows warnings to cause a return value !=0 (i.e., failed build) without immediately terminating the build, so that as all warnings and the first "true" error all get reported.
This is useful for CI on docs which are relatively long to build (e.g. matplotlib), which right now need to be re-run after each warning is fixed to get the next warning (of course, one could locally just not use the -W switch, but it may be tricky for contributors to build docs locally as we test a variety of versions of python and numpy and have non-python dependencies).

Procedure to reproduce the problem

sphinx-build -W

on a doc that generates warnings

Environment info

any

Activity

  1. added this to the some future version milestone on Apr 16, 2017
  2. anntzer commented on Aug 27, 2018

    @anntzer
    ContributorAuthor

    Closed by #5194.

  3. locked as resolved and limited conversation to collaborators on Aug 12, 2021
  4. removed this from the some future version milestone on Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions