From 2978fde0dc6ac1ea3285f8c93df5a95d456baec8 Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Tue, 12 Nov 2019 18:00:05 +0200 Subject: [PATCH] Add tasks.json Former-commit-id: 602d0564b1fe77ff58c4ee00e22d0a7b2c2fab19 --- .vscode/launch.json | 1 + .vscode/tasks.json | 102 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json index 89cb03b..25c47a6 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,6 +8,7 @@ "name": "(Windows) Launch", "type": "cppvsdbg", "request": "launch", + "preLaunchTask": "build", "program": "${workspaceFolder}/target/debug/main.exe", "args": ["${workspaceFolder}/tonc_gba_demo/dma_demo.gba", "--skip-bios"], "stopAtEntry": false, diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..918cd3b --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,102 @@ +// 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": "cargo", + "isShellCommand": true, + "suppressTaskName": true, + "tasks": [ + { + "taskName": "build", + "args": [ "build", "-v" ], + "isBuildCommand": true, + "showOutput": "always", + "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 + } + } + ] + }, + { + "taskName": "clean", + "args": [ "clean" ], + "showOutput": "never" + }, + { + "taskName": "run", + "args": [ "run", "-v" ], + "showOutput": "always", + "isBuildCommand": true, + "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 + } + } + ] + }, + { + "taskName": "test", + "args": [ "test" ], + "showOutput": "always", + "isTestCommand": true, + "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 + } + } + ] + }, + { + "taskName": "bench", + "args": [ "bench" ], + "showOutput": "always", + "isTestCommand": true, + "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 + } + } + ] + } + ] +} \ No newline at end of file