-
-
Save roustem/dc1135bdf20e813ecc3d7dee41a50c54 to your computer and use it in GitHub Desktop.
VS Code tasks.json for Rust/Cargo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// 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