diff options
author | C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> | 2023-08-18 21:21:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-18 21:21:16 (GMT) |
commit | daed54d8de1f45a5ca07ea8dd37bee5882769bd7 (patch) | |
tree | dff97c6498eda6eab3919f5f60ef9aea369ad46d /Doc/tools/warnings-to-gh-actions.py | |
parent | 359cff5c41f87fed3506e6a9a41b6828f4f5cd40 (diff) | |
download | cpython-daed54d8de1f45a5ca07ea8dd37bee5882769bd7.zip cpython-daed54d8de1f45a5ca07ea8dd37bee5882769bd7.tar.gz cpython-daed54d8de1f45a5ca07ea8dd37bee5882769bd7.tar.bz2 |
[3.12] gh-101100: Docs: Check Sphinx warnings and fail if improved (GH-106460) (#108116)
* gh-101100: Docs: Check Sphinx warnings and fail if improved (#106460)
(cherry picked from commit 806d7c98a5da5c1fd2e52a5b666f36ca4f545092)
* [3.12] gh-101100: Docs: Check Sphinx warnings and fail if improved (GH-106460).
(cherry picked from commit 806d7c98a5da5c1fd2e52a5b666f36ca4f545092)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
---------
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Diffstat (limited to 'Doc/tools/warnings-to-gh-actions.py')
-rw-r--r-- | Doc/tools/warnings-to-gh-actions.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/Doc/tools/warnings-to-gh-actions.py b/Doc/tools/warnings-to-gh-actions.py deleted file mode 100644 index da33a4e..0000000 --- a/Doc/tools/warnings-to-gh-actions.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python3 - -""" -Convert Sphinx warning messages to GitHub Actions. - -Converts lines like: - .../Doc/library/cgi.rst:98: WARNING: reference target not found -to: - ::warning file=.../Doc/library/cgi.rst,line=98::reference target not found - -Non-matching lines are echoed unchanged. - -see: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-a-warning-message -""" - -import re -import sys - -pattern = re.compile(r'(?P<file>[^:]+):(?P<line>\d+): WARNING: (?P<msg>.+)') - -for line in sys.stdin: - if match := pattern.fullmatch(line.strip()): - print('::warning file={file},line={line}::{msg}'.format_map(match)) - else: - print(line) |