Skip to content

Commit 8b226e1

Browse files
authored
Rollup merge of rust-lang#112787 - oli-obk:gha_tinder_for_problems, r=jyn514
Add gha problem matcher These regexes capture rustfmt errors, panics and regular Rust errors in CI and automatically add messages in the diff view. This should make it simpler to quickly see what went wrong without having to scroll through CI logs. We can fine tune the regexes or add more matchers after having a look at how it actually works in practice The relevant documentation can be found at https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md r? `@jyn514`
2 parents 0a4cfe5 + 7c7cc12 commit 8b226e1

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

Diff for: src/ci/github-actions/problem_matchers.json

+40
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,46 @@
1010
"message": 3
1111
}
1212
]
13+
},
14+
{
15+
"owner": "cargo-common",
16+
"pattern": [
17+
{
18+
"regexp": "^(warning|warn|error)(\\[(\\S*)\\])?: (.*)$",
19+
"severity": 1,
20+
"message": 4,
21+
"code": 3
22+
},
23+
{
24+
"regexp": "^\\s+-->\\s(\\S+):(\\d+):(\\d+)$",
25+
"file": 1,
26+
"line": 2,
27+
"column": 3
28+
}
29+
]
30+
},
31+
{
32+
"owner": "cargo-test",
33+
"pattern": [
34+
{
35+
"regexp": "^.*panicked\\s+at\\s+'(.*)',\\s+(.*):(\\d+):(\\d+)$",
36+
"message": 1,
37+
"file": 2,
38+
"line": 3,
39+
"column": 4
40+
}
41+
]
42+
},
43+
{
44+
"owner": "cargo-fmt",
45+
"pattern": [
46+
{
47+
"regexp": "^(Diff in (\\S+)) at line (\\d+):",
48+
"message": 1,
49+
"file": 2,
50+
"line": 3
51+
}
52+
]
1353
}
1454
]
1555
}

0 commit comments

Comments
 (0)