Skip to content

Instantly share code, notes, and snippets.

@solnic
Created October 13, 2020 11:29
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 solnic/1dbbbb89515d35b291e6f1b72dbcfa2c to your computer and use it in GitHub Desktop.
Save solnic/1dbbbb89515d35b291e6f1b72dbcfa2c to your computer and use it in GitHub Desktop.
VS Code tasks.json with custom shell configured
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"options": {
"shell": {
"executable": "/usr/local/bin/zsh",
"args": ["-l", "-c"]
}
},
"tasks": [
{
"label": "check env",
"type": "shell",
"command": "env",
"problemMatcher": []
},
{
"label": "check ruby version",
"type": "shell",
"command": "echo `ruby -v`",
"problemMatcher": []
},
{
"label": "test all",
"type": "shell",
"command": "bin/rspec spec/**/*_spec.rb",
"problemMatcher": [],
"group": "test",
"presentation": {
"reveal": "always",
"focus": true
}
},
{
"label": "test current file",
"type": "shell",
"command": "bin/rspec ${relativeFile}",
"problemMatcher": [],
"group": "test",
"presentation": {
"reveal": "always",
"focus": true
}
},
{
"label": "test current line",
"type": "shell",
"command": "bin/rspec ${relativeFile}:${lineNumber}",
"problemMatcher": [],
"group": "test",
"presentation": {
"reveal": "always",
"focus": true
}
},
{
"label": "rubocop format",
"type": "shell",
"command": "rubocop -a ${relativeFile}",
"problemMatcher": [],
"group": "build",
"presentation": {
"reveal": "always"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment