Skip to content

Instantly share code, notes, and snippets.

@polymeris
Created May 7, 2015 19:30
Show Gist options
  • Save polymeris/2b99bee7169952a53165 to your computer and use it in GitHub Desktop.
Save polymeris/2b99bee7169952a53165 to your computer and use it in GitHub Desktop.
Visual Studio Code tasks.json for Lua projects (busted + luacheck)
// 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": "sh",
"tasks": [
{
"taskName": "test",
"showOutput": "always",
"args": [ "/usr/local/bin/busted", "${workspaceRoot}" ]
},
{
"taskName": "lint",
"args": [ "/usr/local/bin/luacheck", "${workspaceRoot}", "--formatter", "plain" ],
"problemMatcher": {
"owner": "lua",
"fileLocation": ["absolute"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+): (.*)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment