We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Sphinx stops emitting warnings if it encounters only one
**Describe the bug**
<!-- A clear and concise description of what the bug is. --> When running pre_push, if Sphinx runs into an warning, it does does print any more. When there are lots of warnings, it takes a lot of time to re-run pre_push per warning

I recommend adding the command line argument `--keep-going`. This will cause it to print all warnings.

**System Info**
 - PRAW Version: Latest


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pre_push.py`
Content:
```
1 #!/usr/bin/env python3
2 """Run static analysis on the project."""
3 
4 import argparse
5 import sys
6 from os import path
7 from shutil import rmtree
8 from subprocess import CalledProcessError, check_call
9 from tempfile import mkdtemp
10 
11 current_directory = path.abspath(path.join(__file__, ".."))
12 
13 
14 def do_process(args, shell=False):
15     """Run program provided by args.
16 
17     Return True on success.
18 
19     Output failed message on non-zero exit and return False.
20 
21     Exit if command is not found.
22     """
23     print("Running: {}".format(" ".join(args)))
24     try:
25         check_call(args, shell=shell)
26     except CalledProcessError:
27         print("\nFailed: {}".format(" ".join(args)))
28         return False
29     except Exception as exc:
30         sys.stderr.write(str(exc) + "\n")
31         sys.exit(1)
32     return True
33 
34 
35 def run_static():
36     """Runs the static tests.
37 
38     Returns a statuscode of 0 if everything ran correctly.
39     Otherwise, it will return statuscode 1
40     """
41     success = True
42     success &= do_process(
43         [
44             sys.executable,
45             path.join(current_directory, "tools", "static_word_checks.py"),
46             "--replace",
47         ]
48     )
49     success &= do_process(["black ."], shell=True)
50     success &= do_process(["flake8", "--exclude=.eggs,build,docs"])
51     success &= do_process(["pydocstyle", "praw"])
52     # success &= do_process(["pylint", "--rcfile=.pylintrc", "praw"])
53 
54     tmp_dir = mkdtemp()
55     try:
56         success &= do_process(["sphinx-build", "-W", "docs", tmp_dir])
57     finally:
58         rmtree(tmp_dir)
59 
60     return success
61 
62 
63 def run_unit():
64     """Runs the unit-tests.
65 
66     Follows the behavior of the static tests,
67     where any failed tests cause pre_push.py to fail.
68     """
69     return do_process(
70         [sys.executable, path.join(current_directory, "setup.py"), "test"]
71     )
72 
73 
74 def main():
75     """Runs the main function.
76 
77     usage: pre_push.py [-h] [-n] [-u] [-a]
78 
79     Run static and/or unit-tests
80     """
81     parser = argparse.ArgumentParser(
82         description="Run static and/or unit-tests"
83     )
84     parser.add_argument(
85         "-n",
86         "--unstatic",
87         action="store_true",
88         help="Do not run static tests (black/flake8/pydocstyle/sphinx-build)",
89         default=False,
90     )
91     parser.add_argument(
92         "-u",
93         "--unit-tests",
94         "--unit",
95         action="store_true",
96         default=False,
97         help="Run the unit tests",
98     )
99     parser.add_argument(
100         "-a",
101         "--all",
102         action="store_true",
103         default=False,
104         help="Run all of the tests (static and unit). "
105         "Overrides the unstatic argument.",
106     )
107     args = parser.parse_args()
108     success = True
109     try:
110         if not args.unstatic or args.all:
111             success &= run_static()
112         if args.all or args.unit_tests:
113             success &= run_unit()
114     except KeyboardInterrupt:
115         return int(not False)
116     return int(not success)
117 
118 
119 if __name__ == "__main__":
120     exit_code = main()
121     print(
122         "\npre_push.py: Success!" if not exit_code else "\npre_push.py: Fail"
123     )
124     sys.exit(exit_code)
125
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/pre_push.py b/pre_push.py
--- a/pre_push.py
+++ b/pre_push.py
@@ -53,7 +53,9 @@
 
     tmp_dir = mkdtemp()
     try:
-        success &= do_process(["sphinx-build", "-W", "docs", tmp_dir])
+        success &= do_process(
+            ["sphinx-build", "-W", "--keep-going", "docs", tmp_dir]
+        )
     finally:
         rmtree(tmp_dir)

{"golden_diff": "diff --git a/pre_push.py b/pre_push.py\n--- a/pre_push.py\n+++ b/pre_push.py\n@@ -53,7 +53,9 @@\n \n     tmp_dir = mkdtemp()\n     try:\n-        success &= do_process([\"sphinx-build\", \"-W\", \"docs\", tmp_dir])\n+        success &= do_process(\n+            [\"sphinx-build\", \"-W\", \"--keep-going\", \"docs\", tmp_dir]\n+        )\n     finally:\n         rmtree(tmp_dir)\n", "issue": "Sphinx stops emitting warnings if it encounters only one\n**Describe the bug**\r\n<!-- A clear and concise description of what the bug is. --> When running pre_push, if Sphinx runs into an warning, it does does print any more. When there are lots of warnings, it takes a lot of time to re-run pre_push per warning\r\n\r\nI recommend adding the command line argument `--keep-going`. This will cause it to print all warnings.\r\n\r\n**System Info**\r\n - PRAW Version: Latest\r\n\n", "before_files": [{"content": "#!/usr/bin/env python3\n\"\"\"Run static analysis on the project.\"\"\"\n\nimport argparse\nimport sys\nfrom os import path\nfrom shutil import rmtree\nfrom subprocess import CalledProcessError, check_call\nfrom tempfile import mkdtemp\n\ncurrent_directory = path.abspath(path.join(__file__, \"..\"))\n\n\ndef do_process(args, shell=False):\n    \"\"\"Run program provided by args.\n\n    Return True on success.\n\n    Output failed message on non-zero exit and return False.\n\n    Exit if command is not found.\n    \"\"\"\n    print(\"Running: {}\".format(\" \".join(args)))\n    try:\n        check_call(args, shell=shell)\n    except CalledProcessError:\n        print(\"\\nFailed: {}\".format(\" \".join(args)))\n        return False\n    except Exception as exc:\n        sys.stderr.write(str(exc) + \"\\n\")\n        sys.exit(1)\n    return True\n\n\ndef run_static():\n    \"\"\"Runs the static tests.\n\n    Returns a statuscode of 0 if everything ran correctly.\n    Otherwise, it will return statuscode 1\n    \"\"\"\n    success = True\n    success &= do_process(\n        [\n            sys.executable,\n            path.join(current_directory, \"tools\", \"static_word_checks.py\"),\n            \"--replace\",\n        ]\n    )\n    success &= do_process([\"black .\"], shell=True)\n    success &= do_process([\"flake8\", \"--exclude=.eggs,build,docs\"])\n    success &= do_process([\"pydocstyle\", \"praw\"])\n    # success &= do_process([\"pylint\", \"--rcfile=.pylintrc\", \"praw\"])\n\n    tmp_dir = mkdtemp()\n    try:\n        success &= do_process([\"sphinx-build\", \"-W\", \"docs\", tmp_dir])\n    finally:\n        rmtree(tmp_dir)\n\n    return success\n\n\ndef run_unit():\n    \"\"\"Runs the unit-tests.\n\n    Follows the behavior of the static tests,\n    where any failed tests cause pre_push.py to fail.\n    \"\"\"\n    return do_process(\n        [sys.executable, path.join(current_directory, \"setup.py\"), \"test\"]\n    )\n\n\ndef main():\n    \"\"\"Runs the main function.\n\n    usage: pre_push.py [-h] [-n] [-u] [-a]\n\n    Run static and/or unit-tests\n    \"\"\"\n    parser = argparse.ArgumentParser(\n        description=\"Run static and/or unit-tests\"\n    )\n    parser.add_argument(\n        \"-n\",\n        \"--unstatic\",\n        action=\"store_true\",\n        help=\"Do not run static tests (black/flake8/pydocstyle/sphinx-build)\",\n        default=False,\n    )\n    parser.add_argument(\n        \"-u\",\n        \"--unit-tests\",\n        \"--unit\",\n        action=\"store_true\",\n        default=False,\n        help=\"Run the unit tests\",\n    )\n    parser.add_argument(\n        \"-a\",\n        \"--all\",\n        action=\"store_true\",\n        default=False,\n        help=\"Run all of the tests (static and unit). \"\n        \"Overrides the unstatic argument.\",\n    )\n    args = parser.parse_args()\n    success = True\n    try:\n        if not args.unstatic or args.all:\n            success &= run_static()\n        if args.all or args.unit_tests:\n            success &= run_unit()\n    except KeyboardInterrupt:\n        return int(not False)\n    return int(not success)\n\n\nif __name__ == \"__main__\":\n    exit_code = main()\n    print(\n        \"\\npre_push.py: Success!\" if not exit_code else \"\\npre_push.py: Fail\"\n    )\n    sys.exit(exit_code)\n", "path": "pre_push.py"}], "after_files": [{"content": "#!/usr/bin/env python3\n\"\"\"Run static analysis on the project.\"\"\"\n\nimport argparse\nimport sys\nfrom os import path\nfrom shutil import rmtree\nfrom subprocess import CalledProcessError, check_call\nfrom tempfile import mkdtemp\n\ncurrent_directory = path.abspath(path.join(__file__, \"..\"))\n\n\ndef do_process(args, shell=False):\n    \"\"\"Run program provided by args.\n\n    Return True on success.\n\n    Output failed message on non-zero exit and return False.\n\n    Exit if command is not found.\n    \"\"\"\n    print(\"Running: {}\".format(\" \".join(args)))\n    try:\n        check_call(args, shell=shell)\n    except CalledProcessError:\n        print(\"\\nFailed: {}\".format(\" \".join(args)))\n        return False\n    except Exception as exc:\n        sys.stderr.write(str(exc) + \"\\n\")\n        sys.exit(1)\n    return True\n\n\ndef run_static():\n    \"\"\"Runs the static tests.\n\n    Returns a statuscode of 0 if everything ran correctly.\n    Otherwise, it will return statuscode 1\n    \"\"\"\n    success = True\n    success &= do_process(\n        [\n            sys.executable,\n            path.join(current_directory, \"tools\", \"static_word_checks.py\"),\n            \"--replace\",\n        ]\n    )\n    success &= do_process([\"black .\"], shell=True)\n    success &= do_process([\"flake8\", \"--exclude=.eggs,build,docs\"])\n    success &= do_process([\"pydocstyle\", \"praw\"])\n    # success &= do_process([\"pylint\", \"--rcfile=.pylintrc\", \"praw\"])\n\n    tmp_dir = mkdtemp()\n    try:\n        success &= do_process(\n            [\"sphinx-build\", \"-W\", \"--keep-going\", \"docs\", tmp_dir]\n        )\n    finally:\n        rmtree(tmp_dir)\n\n    return success\n\n\ndef run_unit():\n    \"\"\"Runs the unit-tests.\n\n    Follows the behavior of the static tests,\n    where any failed tests cause pre_push.py to fail.\n    \"\"\"\n    return do_process(\n        [sys.executable, path.join(current_directory, \"setup.py\"), \"test\"]\n    )\n\n\ndef main():\n    \"\"\"Runs the main function.\n\n    usage: pre_push.py [-h] [-n] [-u] [-a]\n\n    Run static and/or unit-tests\n    \"\"\"\n    parser = argparse.ArgumentParser(\n        description=\"Run static and/or unit-tests\"\n    )\n    parser.add_argument(\n        \"-n\",\n        \"--unstatic\",\n        action=\"store_true\",\n        help=\"Do not run static tests (black/flake8/pydocstyle/sphinx-build)\",\n        default=False,\n    )\n    parser.add_argument(\n        \"-u\",\n        \"--unit-tests\",\n        \"--unit\",\n        action=\"store_true\",\n        default=False,\n        help=\"Run the unit tests\",\n    )\n    parser.add_argument(\n        \"-a\",\n        \"--all\",\n        action=\"store_true\",\n        default=False,\n        help=\"Run all of the tests (static and unit). \"\n        \"Overrides the unstatic argument.\",\n    )\n    args = parser.parse_args()\n    success = True\n    try:\n        if not args.unstatic or args.all:\n            success &= run_static()\n        if args.all or args.unit_tests:\n            success &= run_unit()\n    except KeyboardInterrupt:\n        return int(not False)\n    return int(not success)\n\n\nif __name__ == \"__main__\":\n    exit_code = main()\n    print(\n        \"\\npre_push.py: Success!\" if not exit_code else \"\\npre_push.py: Fail\"\n    )\n    sys.exit(exit_code)\n", "path": "pre_push.py"}]}