Skip to content

Instantly share code, notes, and snippets.

@JunSuzukiJapan
Last active August 18, 2019 17:52
Show Gist options
  • Save JunSuzukiJapan/8b02d1f866a90b7e45b5fa53a40cf8ee to your computer and use it in GitHub Desktop.
Save JunSuzukiJapan/8b02d1f866a90b7e45b5fa53a40cf8ee to your computer and use it in GitHub Desktop.
VS Code tasks.json for Rust/Cargo
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "cargo build",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"panel": "new"
},
"problemMatcher": {
"owner": "rust",
"fileLocation": [
"relative",
"${workspaceRoot}"
],
"pattern": {
"regexp": "^(.+):(\\d+):(\\d+):\\s+(\\d+):(\\d+)\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"endLine": 4,
"endColumn": 5,
"severity": 6,
"message": 7
}
}
},
{
"label": "clean",
"type": "shell",
"command": "cargo clean"
},
{
"label": "run",
"type": "shell",
"command": "cargo run",
"presentation": {
"panel": "new"
},
"problemMatcher": []
},
{
"label": "test",
"type": "shell",
"command": "cargo test",
"group": {
"kind": "test",
"isDefault": true
},
"presentation": {
"panel": "new"
},
"problemMatcher": [
{
"owner": "rust",
"fileLocation": [
"relative",
"${workspaceRoot}"
],
"pattern": {
"regexp": "^(.+):(\\d+):(\\d+):\\s+(\\d+):(\\d+)\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"endLine": 4,
"endColumn": 5,
"severity": 6,
"message": 7
}
},
{
"owner": "rust",
"fileLocation": [
"relative",
"${workspaceRoot}"
],
"severity": "error",
"pattern": {
"regexp": "^.*panicked\\s+at\\s+'(.*)',\\s+(.*):(\\d+)$",
"message": 1,
"file": 2,
"line": 3
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment