2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[VS Code]Crystal用tasks.json

Last updated at Posted at 2018-02-22
tasks.json
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "type": "shell",
            "command": "crystal",
            "args": [
                "build",
                "${workspaceRoot}/src/${workspaceRootFolderName}.cr"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "panel": "new"
            },
            "problemMatcher": {
                "owner": "crystal",
                "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
                }
            }
        },
        {
            "label": "run",
            "type": "shell",
            "command": "crystal",
            "args": [
                "run",
                "${workspaceRoot}/src/${workspaceRootFolderName}.cr"
            ],
            "presentation": {
                "panel": "new"
            },
            "problemMatcher": []
        },
        {
            "label": "test",
            "type": "shell",
            "command": "crystal spec",
            "group": {
                "kind": "test",
                "isDefault": true
            },
            "presentation": {
                "panel": "new"
            },
            "problemMatcher": [
                {
                    "owner": "crystal",
                    "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": "crystal",
                    "fileLocation": [
                        "relative",
                        "${workspaceRoot}"
                    ],
                    "severity": "error",
                    "pattern": {
                        "regexp": "^.*panicked\\s+at\\s+'(.*)',\\s+(.*):(\\d+)$",
                        "message": 1,
                        "file": 2,
                        "line": 3
                    }
                }
            ]
        }
    ]
}
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?