mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Fixes #30094: The less extension should contribute problem matchers for common less and sass compilers
This commit is contained in:
@@ -18,6 +18,21 @@
|
||||
"language": "less",
|
||||
"scopeName": "source.css.less",
|
||||
"path": "./syntaxes/less.tmLanguage.json"
|
||||
}]
|
||||
}],
|
||||
"problemMatchers": [
|
||||
{
|
||||
"name": "lessc",
|
||||
"label": "Lessc compiler",
|
||||
"owner": "lessc",
|
||||
"fileLocation": "absolute",
|
||||
"pattern": {
|
||||
"regexp": "(.*)\\sin\\s(.*)\\son line\\s(\\d+),\\scolumn\\s(\\d+)",
|
||||
"message": 1,
|
||||
"file": 2,
|
||||
"line": 3,
|
||||
"column": 4
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,44 @@
|
||||
"language": "scss",
|
||||
"scopeName": "source.css.scss",
|
||||
"path": "./syntaxes/scss.json"
|
||||
}]
|
||||
}],
|
||||
"problemMatchers": [
|
||||
{
|
||||
"name": "node-sass",
|
||||
"label": "Node Sass Compiler",
|
||||
"owner": "node-sass",
|
||||
"fileLocation": "absolute",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^{$"
|
||||
},
|
||||
{
|
||||
"regexp": "\\s*\"status\":\\s\\d+,"
|
||||
},
|
||||
{
|
||||
"regexp": "\\s*\"file\":\\s\"(.*)\",",
|
||||
"file": 1
|
||||
},
|
||||
{
|
||||
"regexp": "\\s*\"line\":\\s(\\d+),",
|
||||
"line": 1
|
||||
},
|
||||
{
|
||||
"regexp": "\\s*\"column\":\\s(\\d+),",
|
||||
"column": 1
|
||||
},
|
||||
{
|
||||
"regexp": "\\s*\"message\":\\s\"(.*)\",",
|
||||
"message": 1
|
||||
},
|
||||
{
|
||||
"regexp": "\\s*\"formatted\":\\s(.*)"
|
||||
},
|
||||
{
|
||||
"regexp": "^}$"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -116,6 +116,7 @@ export interface ProblemMatcher {
|
||||
export interface NamedProblemMatcher extends ProblemMatcher {
|
||||
name: string;
|
||||
label: string;
|
||||
deprecated?: boolean;
|
||||
}
|
||||
|
||||
export interface NamedMultiLineProblemPattern {
|
||||
@@ -1586,6 +1587,7 @@ class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry {
|
||||
this.add({
|
||||
name: 'lessCompile',
|
||||
label: localize('lessCompile', 'Less problems'),
|
||||
deprecated: true,
|
||||
owner: 'lessCompile',
|
||||
applyTo: ApplyToKind.allDocuments,
|
||||
fileLocation: FileLocationKind.Absolute,
|
||||
|
||||
@@ -947,6 +947,9 @@ class TaskService extends EventEmitter implements ITaskService {
|
||||
let entries: ProblemMatcherPickEntry[] = [];
|
||||
for (let key of ProblemMatcherRegistry.keys()) {
|
||||
let matcher = ProblemMatcherRegistry.get(key);
|
||||
if (matcher.deprecated) {
|
||||
continue;
|
||||
}
|
||||
if (matcher.name === matcher.label) {
|
||||
entries.push({ label: matcher.name, matcher: matcher });
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user