summaryrefslogtreecommitdiffstats
path: root/Doc/tools/warnings-to-gh-actions.py
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/tools/warnings-to-gh-actions.py')
-rw-r--r--Doc/tools/warnings-to-gh-actions.py25
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)