Skip to content

Instantly share code, notes, and snippets.

@colin-haber
Last active June 6, 2019 13:29
Show Gist options
  • Save colin-haber/fb8b48986436d6960a20c0ec3a8a0800 to your computer and use it in GitHub Desktop.
Save colin-haber/fb8b48986436d6960a20c0ec3a8a0800 to your computer and use it in GitHub Desktop.
A Visual Studio Code problem matcher for Sass command-line errors.
"problemMatcher": {
"pattern": {
"regexp": "^\\s*(\\S+) (\\S+)(?: \\(Line (\\d+): ([^\\)]*)\\))?$",
"severity": 1,
"file": 2,
"line": 3,
"message": 4
}
}
@dehart
Copy link

dehart commented Jun 6, 2019

Cool did not know this was possible.
Here is one that works for for SassC + LibSass:

"problemMatcher": {
    "fileLocation": "relative",
    "pattern": [{
        "regexp": "^(\\S+): (.+)$",
        "severity": 1,
        "message": 2
    },{
        "regexp": "^(?:\\s+ on line (\\d+) of (.*))?$",
        "line": 1,
        "file": 2,
    }]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment