Created
January 15, 2020 19:49
-
-
Save munckymagik/b08250c0e5c12d6971d346d5fcefdc7f to your computer and use it in GitHub Desktop.
VSCode tasks with problem matchers for Rust
This file contains 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": { | |
"clear": true, | |
}, | |
"problemMatcher": { | |
"owner": "rust", | |
"fileLocation": [ | |
"relative", | |
"${workspaceFolder}" | |
], | |
"pattern": [ | |
{ | |
"regexp": "(error(\\[E\\d+\\])?|warning): (.*)", | |
"severity": 1, | |
"message": 3 | |
}, | |
{ | |
"regexp": "\\s+--> ([^:]+):(\\d+):(\\d+)", | |
"file": 1, | |
"line": 2, | |
"column": 3 | |
} | |
] | |
} | |
}, | |
{ | |
"label": "Test", | |
"type": "shell", | |
"command": "cargo test --lib", | |
"group": { | |
"kind": "test", | |
"isDefault": true | |
}, | |
"presentation": { | |
"clear": true | |
}, | |
"problemMatcher": { | |
"owner": "rust", | |
"fileLocation": ["relative", "${workspaceFolder}"], | |
"pattern":[ | |
{ | |
"regexp": "(error(\\[E\\d+\\])?|warning): (.*)", | |
"severity": 1, | |
"message": 3 | |
}, | |
{ | |
"regexp": "\\s+--> ([^:]+):(\\d+):(\\d+)", | |
"file": 1, | |
"line": 2, | |
"column": 3 | |
} | |
] | |
} | |
}, | |
{ | |
"label": "Format", | |
"type": "shell", | |
"command": "cargo fmt", | |
"presentation": { | |
"clear": true | |
}, | |
"problemMatcher": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment