Skip to content

Commit

Permalink
Rollup merge of #112787 - oli-obk:gha_tinder_for_problems, r=jyn514
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
jyn514 committed Jun 19, 2023
2 parents 0a4cfe5 + 7c7cc12 commit 8b226e1
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/ci/github-actions/problem_matchers.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,46 @@
"message": 3
}
]
},
{
"owner": "cargo-common",
"pattern": [
{
"regexp": "^(warning|warn|error)(\\[(\\S*)\\])?: (.*)$",
"severity": 1,
"message": 4,
"code": 3
},
{
"regexp": "^\\s+-->\\s(\\S+):(\\d+):(\\d+)$",
"file": 1,
"line": 2,
"column": 3
}
]
},
{
"owner": "cargo-test",
"pattern": [
{
"regexp": "^.*panicked\\s+at\\s+'(.*)',\\s+(.*):(\\d+):(\\d+)$",
"message": 1,
"file": 2,
"line": 3,
"column": 4
}
]
},
{
"owner": "cargo-fmt",
"pattern": [
{
"regexp": "^(Diff in (\\S+)) at line (\\d+):",
"message": 1,
"file": 2,
"line": 3
}
]
}
]
}

0 comments on commit 8b226e1

Please sign in to comment.