提交 6769baf4 编写于 作者: D Dirk Baeumer

Fixes #30094: The less extension should contribute problem matchers for common...

Fixes #30094: The less extension should contribute problem matchers for common less and sass compilers
上级 d9fc2221
......@@ -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
}
}
]
}
}
\ No newline at end of file
......@@ -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": "^}$"
}
]
}
]
}
}
\ No newline at end of file
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册