Skip to content

How to integrate custom build diagnostics (errors, warnings, etc) with the Swift-VSCode extension? #1562

Closed Answered by matthewbastien
josh-arnold-1 asked this question in Q&A
Discussion options

You must be logged in to vote

If you want problems from Bazel build to show up in the editor then you can set up a build task with a problem matcher. It would look something like:

{
    "label": "Bazel Build",
    "type": "shell",
    "command": "bazel",
    "args": ["build", "//some:target"],
    "group": "build",
    "problemMatcher": {
        "owner": "bazel",
        "pattern": [
            {
                // Insert pattern matcher here
            }
        ]
    }
}

I went looking for official VS Code documentation on the problem matchers, but I can't seem to find it... The only documentation I could find only showed how to use problem matchers that were already created via an extension: https://code.visuals…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@matthewbastien
Comment options

@josh-arnold-1
Comment options

Answer selected by josh-arnold-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants