Skip to content

Instantly share code, notes, and snippets.

@dvirsky
Created September 20, 2016 11:41
Show Gist options
  • Save dvirsky/eb6569afaa8c25724408b8ac7b91e345 to your computer and use it in GitHub Desktop.
Save dvirsky/eb6569afaa8c25724408b8ac7b91e345 to your computer and use it in GitHub Desktop.
tasks.json for building and testing generic go projects in vscode
{
"version": "0.1.0",
"isShellCommand": true,
"showOutput": "always",
"command": "go",
"echoCommand": true ,
"options": {
"cwd": "${fileDirname}"
},
"tasks": [
{
"taskName": "build",
"args": [
"-i"
],
"showOutput": "always",
"isBuildCommand": true,
"problemMatcher": {
"owner": "go",
"fileLocation": ["relative", "${cwd}"],
"pattern": {
"regexp": "^(.+)\\:(\\d+)\\:(.+)$",
"file": 1,
"location":2,
"message": 3
}
}
},
{
"taskName": "test",
"isTestCommand": true,
"showOutput": "always",
"problemMatcher": {
"owner": "go",
"fileLocation": ["relative", "${cwd}"],
"pattern": {
"regexp": "^(.+)\\:(\\d+)\\:(.+)$",
"file": 1,
"location":2,
"message": 3
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment