Skip to content

Commit

Permalink
Auto merge of #15690 - Enselic:fix-regexp, r=Veykril
Browse files Browse the repository at this point in the history
vscode: Fix line and col regexp for `rustc` problem matcher

When building the Rust compiler with `./x check` from within VS Code, the current `rustc` problem matcher thinks that the output from that command that looks like this:

    Build completed successfully in 0:00:26

is about a problem in a file named `0` on line 00, col 26. This wouldn't be so bad if it wasn't for that VS Code tends to get stuck on this problem because of problems with opening the file '0'.

The rust compiler will never output problems with a line or a column that starts with 0, so change the regexp to require lines and cols to begin with `[1-9]` to fix this problem.
  • Loading branch information
bors committed Oct 4, 2023
2 parents 7e9da40 + dd8ea97 commit ad73597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editors/code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1621,7 +1621,7 @@
"message": 3
},
{
"regexp": "^[\\s->=]*(.*?):(\\d*):(\\d*)\\s*$",
"regexp": "^[\\s->=]*(.*?):([1-9]\\d*):([1-9]\\d*)\\s*$",
"file": 1,
"line": 2,
"column": 3
Expand Down

0 comments on commit ad73597

Please sign in to comment.