Skip to content

Instantly share code, notes, and snippets.

@aLekSer
Created December 10, 2020 00:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aLekSer/a3375097fd4de76be7a6de51a5fcf371 to your computer and use it in GitHub Desktop.
Save aLekSer/a3375097fd4de76be7a6de51a5fcf371 to your computer and use it in GitHub Desktop.
Tasks json variation for VS Code Golang. TODO: fix, file position for tests problem matcher.
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "lint",
"type": "shell",
"command": "make lint",
"problemMatcher": [
"$go"
]
},
{
"label": "test",
"type": "shell",
"command": "make test",
"problemMatcher": [
"$go"
]
},
{
"label": "unittest",
"type": "shell",
"command": "go test -count 1 $(go list ./... | grep -v /e2e) ",
"problemMatcher": {
"owner": "go",
"fileLocation": ["relative", "${cwd}"],
"pattern": [
{
"regexp": "^.*Error Trace:\\s*(\\S*):(.*)()$",
"file": 1,
"line": 2
},
{
"regexp": "^.*Error:\\s*(.*)$",
"message": 1
}
]
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "presubmit",
"type": "shell",
"command": "make presubmit",
"problemMatcher": [
"$go"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment