FHIR Chat · vscode problem-matcher · shorthand

Stream: shorthand

Topic: vscode problem-matcher


view this post on Zulip Eirik Myklebost (Oct 09 2021 at 13:46):

For anyone doing FSH development using vscode. You can create a custom-task i tasks.json that will allow you to build your fsh-project using ctrl+shift+b and get errors in the problems tab including linting.
vscode-sushi-task.png

tasks.json:

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "SUSHI",
      "type": "shell",
      "command": "sushi ${workspaceFolder}",
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "presentation": {
        "clear": true
      },
      "problemMatcher": [
        {
          "fileLocation": "absolute",
          "pattern": [
            {
              "regexp": "^(warn|error) (.+)$",
              "severity": 1,
              "message": 2
            },
            {
              "regexp": "^  File: (.+)$",
              "file": 1,
            },
            {
              "regexp": "^  Line: (\\d+)$",
              "line": 1,
            }
          ]
        }
      ]
    },
  ]
}

view this post on Zulip Chris Moesel (Oct 12 2021 at 21:34):

@Eirik Myklebost -- thanks for the hint! That looks great! We'll have to see if this is something we can integrate into the official plugin. If so, I think we probably will -- because it looks very helpful!


Last updated: Apr 12 2022 at 19:14 UTC