aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmmar Askar <ammar@ammaraskar.com>2020-12-28 13:28:40 -0500
committerGitHub <noreply@github.com>2020-12-28 12:28:40 -0600
commit1031f23fc3aed6760785bf0f8290bd2b2cce41c2 (patch)
tree9b2154c731f6d4288864baca4824fc1fb5f0111e /.github
parentbpo-40077: Fix typo in simplequeue_get_state_by_type() (GH-23975) (diff)
downloadcpython-1031f23fc3aed6760785bf0f8290bd2b2cce41c2.tar.gz
cpython-1031f23fc3aed6760785bf0f8290bd2b2cce41c2.tar.bz2
cpython-1031f23fc3aed6760785bf0f8290bd2b2cce41c2.zip
[workflow] Use MSVC problem matcher for Windows action build (GH-18532)
This makes warnings and errors from the compiler very prominent so this should help prevent warnings from sneaking into the code base and catch them in review. See https://discuss.python.org/t/using-github-problem-matchers-to-catch-warnings-early/4254 for more details You can see a demo of this in action here: https://github.com/ammaraskar/cpython/pull/15/files#diff-9ba2eeca0f254ece0a9df4d7cb68e870 GCC and Sphinx matchers have previously been added in GH-18567 and GH-20325, respectively.
Diffstat (limited to '.github')
-rw-r--r--.github/problem-matchers/msvc.json19
-rw-r--r--.github/workflows/build.yml2
2 files changed, 21 insertions, 0 deletions
diff --git a/.github/problem-matchers/msvc.json b/.github/problem-matchers/msvc.json
new file mode 100644
index 00000000000..303a36b1c58
--- /dev/null
+++ b/.github/problem-matchers/msvc.json
@@ -0,0 +1,19 @@
+{
+ "__comment": "Taken from vscode's vs/workbench/contrib/tasks/common/problemMatcher.ts msCompile rule",
+ "problemMatcher": [
+ {
+ "owner": "msvc-problem-matcher",
+ "pattern": [
+ {
+ "regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
+ "file": 1,
+ "line": 2,
+ "column": 3,
+ "severity": 4,
+ "code": 5,
+ "message": 6
+ }
+ ]
+ }
+ ]
+ } \ No newline at end of file
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 71c307b6c62..1b865a17b09 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -99,6 +99,8 @@ jobs:
if: needs.check_source.outputs.run_tests == 'true'
steps:
- uses: actions/checkout@v2
+ - name: Register MSVC problem matcher
+ run: echo "::add-matcher::.github/problem-matchers/msvc.json"
- name: Build CPython
run: .\PCbuild\build.bat -e -p x64
- name: Display build info