Skip to content

Instantly share code, notes, and snippets.

@mpontus
Created April 5, 2020 22:48
Show Gist options
  • Save mpontus/82d3a14c090f188f9e78f5e7aa2ff011 to your computer and use it in GitHub Desktop.
Save mpontus/82d3a14c090f188f9e78f5e7aa2ff011 to your computer and use it in GitHub Desktop.
VSCode task for running `cargo test` in watch mode
{
"version": "2.0.0",
"tasks": [
{
"label": "Run `cargo test` in watch mode",
"detail": "Requires \"cargo watch\" subcommand: https://github.com/passcod/cargo-watch",
"group": "test",
"type": "process",
"command": "cargo",
"args": ["watch", "-x", "test --no-fail-fast"],
"isBackground": true,
"problemMatcher": [
{
"owner": "rust",
"severity": "error",
"fileLocation": ["relative", "${workspaceRoot}"],
"background": {
"beginsPattern": "^\\[Running '.*'\\]$",
"endsPattern": "^\\[Finished running. Exit status: \\d+\\]$"
},
"pattern": {
"regexp": "^.*panicked\\s+at\\s+'(.*)',\\s+(.*):(\\d+):(\\d+)$",
"message": 1,
"file": 2,
"line": 3,
"column": 4
}
},
{
"owner": "rust",
"severity": "error",
"fileLocation": ["relative", "${workspaceRoot}"],
"background": {
"beginsPattern": "^\\[Running '.*'\\]$",
"endsPattern": "^\\[Finished running. Exit status: \\d+\\]$"
},
"pattern": [
{
"regexp": ".*panicked\\s+at\\s+'(.*)",
"message": 1
},
{
"regexp": "^.*$",
"message": 0
},
{
"regexp": "^(.*)', (\\S*):(\\d+):(\\d+)$",
"message": 1,
"file": 2,
"line": 3,
"column": 4
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment