Skip to content

Instantly share code, notes, and snippets.

@arturoc
Last active August 29, 2015 14:20
Show Gist options
  • Save arturoc/e56d5addcf2157cda78d to your computer and use it in GitHub Desktop.
Save arturoc/e56d5addcf2157cda78d to your computer and use it in GitHub Desktop.
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process
{
"version": "0.1.0",
"command": "make",
"isShellCommand": true,
"tasks": [
{
"taskName": "Debug",
// Make this the default build command.
"isBuildCommand": true,
// Show the output window only if unrecognized errors occur.
"showOutput": "always",
"args": [
"Debug"
],
// Use the standard less compilation problem matcher.
"problemMatcher": {
// The problem is owned by the cpp language service.
"owner": "cpp",
// The file name for a reported problems is relative to the opened folder.
"fileLocation": ["relative", "${workspaceRoot}"],
// The actual pattern to match problems in the output.
"pattern": {
// The regular expression. Example to match: helloWorld.c:5:3: warning: implicit declaration of function ‘prinft’ [-Wimplicit-function-declaration]
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
// The first match group matches the file name which is relative.
"file": 1,
// The second match group matches the line on which the problem occurred.
"line": 2,
// The third match group matches the column at which the problem occurred.
"column": 3,
// The forth match group matches the problem's severity. Can be ignore. Then all problems are captured as errors.
"severity": 4,
// The fifth match group matches the message.
"message": 5
}
}
},
{
"taskName": "Release",
// Make this the default build command.
"isBuildCommand": true,
// Show the output window only if unrecognized errors occur.
"showOutput": "always",
"args": [
"Release"
],
// Use the standard less compilation problem matcher.
"problemMatcher": {
// The problem is owned by the cpp language service.
"owner": "cpp",
// The file name for a reported problems is relative to the opened folder.
"fileLocation": ["relative", "${workspaceRoot}"],
// The actual pattern to match problems in the output.
"pattern": {
// The regular expression. Example to match: helloWorld.c:5:3: warning: implicit declaration of function ‘prinft’ [-Wimplicit-function-declaration]
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
// The first match group matches the file name which is relative.
"file": 1,
// The second match group matches the line on which the problem occurred.
"line": 2,
// The third match group matches the column at which the problem occurred.
"column": 3,
// The forth match group matches the problem's severity. Can be ignore. Then all problems are captured as errors.
"severity": 4,
// The fifth match group matches the message.
"message": 5
}
}
},
{
"taskName": "Run Debug",
// Make this the default build command.
"isTestCommand": true,
// Show the output window only if unrecognized errors occur.
"showOutput": "always",
"args": [
"RunDebug"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment