export function isNamedProblemMatcher(value: ProblemMatcher): value is INamedProblemMatcher {
}
}
Frontier kind: Code frontier
unlabeled · c_6e7cc962f653
6 tests · 21551 LOC · 80 files · introduces 0 tests · 84 LOC · 3 files
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
Every exact file and test below is linked only from the concept that introduces it.
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/tasks/test/common/taskConfiguration.test|title=Tasks version 0.1.0 tasks: problem matcher .* regular expression|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/tasks/test/common/taskConfiguration.test|title=Tasks version 0.1.0 tasks: problem matcher default|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/charCode.test|title=CharCode has good values|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/path.test|title=Paths (Node Implementation) path|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, win-speciale|occurrence=1Every collected test enters the hierarchy at exactly one concept.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Every collected source range enters the hierarchy at exactly one concept.
3 files ranked by introduced lines: 84 introduced LOC across 35 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
export function isNamedProblemMatcher(value: ProblemMatcher): value is INamedProblemMatcher {
}
}
constructor(logger: IProblemReporter) {
}
public parse(json: Config.ProblemMatcher): ProblemMatcher | undefined {
if (!this.checkProblemMatcherValid(json, result)) {
return undefined;
}
return result;
}
private checkProblemMatcherValid(externalProblemMatcher: Config.ProblemMatcher, problemMatcher: ProblemMatcher | null): problemMatcher is ProblemMatcher {
this.error(localize('ProblemMatcherParser.noProblemMatcher', 'Error: the description can\'t be converted into a problem matcher:\n{0}\n', JSON.stringify(externalProblemMatcher, null, 4)));
return false;
}
this.error(localize('ProblemMatcherParser.noProblemPattern', 'Error: the description doesn\'t define a valid problem pattern:\n{0}\n', JSON.stringify(externalProblemMatcher, null, 4)));
return false;
}
this.error(localize('ProblemMatcherParser.noOwner', 'Error: the description doesn\'t define an owner:\n{0}\n', JSON.stringify(externalProblemMatcher, null, 4)));
return false;
}
this.error(localize('ProblemMatcherParser.noFileLocation', 'Error: the description doesn\'t define a file location:\n{0}\n', JSON.stringify(externalProblemMatcher, null, 4)));
return false;
}
}
private createProblemMatcher(description: Config.ProblemMatcher): ProblemMatcher | null {
const owner = Types.isString(description.owner) ? description.owner : UUID.generateUuid();
const source = Types.isString(description.source) ? description.source : undefined;
let applyTo = Types.isString(description.applyTo) ? ApplyToKind.fromString(description.applyTo) : ApplyToKind.allDocuments;
if (!applyTo) {
applyTo = ApplyToKind.allDocuments;
}
let filePrefix: string | Config.SearchFileLocationArgs | undefined = undefined;
let kind: FileLocationKind | undefined;
if (Types.isUndefined(description.fileLocation)) {
fileLocation = FileLocationKind.Relative;
filePrefix = '${workspaceFolder}';
kind = FileLocationKind.fromString(<string>description.fileLocation);
if (kind) {
}
}
const pattern = description.pattern ? this.createProblemPattern(description.pattern) : undefined;
let severity = description.severity ? Severity.fromValue(description.severity) : undefined;
if (severity === Severity.Ignore) {
this.info(localize('ProblemMatcherParser.unknownSeverity', 'Info: unknown severity {0}. Valid values are error, warning and info.\n', description.severity));
severity = Severity.Error;
}
if (Types.isString(description.base)) {
const variableName = <string>description.base;
if (variableName.length > 1 && variableName[0] === '$') {
}
}
result = {
owner: owner,
applyTo: applyTo,
fileLocation: fileLocation,
pattern: pattern,
};
if (source) {
result.source = source;
}
result.filePrefix = filePrefix;
}
result.severity = severity;
}
if (Config.isNamedProblemMatcher(description)) {
(result as INamedProblemMatcher).name = description.name;
(result as INamedProblemMatcher).label = Types.isString(description.label) ? description.label : description.name;
}
}
private createProblemPattern(value: string | Config.IProblemPattern | Config.MultiLineProblemPattern): Types.SingleOrMany<IProblemPattern> | null {
const variableName: string = <string>value;
if (variableName.length > 1 && variableName[0] === '$') {
}
}
const problemPatternParser = new ProblemPatternParser(this.problemReporter);
if (Array.isArray(value)) {
return problemPatternParser.parse(value);
return problemPatternParser.parse(value);
}
}
return null;
private addWatchingMatcher(external: Config.ProblemMatcher, internal: ProblemMatcher): void {
const oldBegins = this.createRegularExpression(external.watchedTaskBeginsRegExp);
problemMatcher.ts
const oldEnds = this.createRegularExpression(external.watchedTaskEndsRegExp);
if (oldBegins && oldEnds) {
internal.watching = {
activeOnStart: false,
return;
}
if (Types.isUndefinedOrNull(backgroundMonitor)) {
return;
}
const begins: IWatchingPattern | null = this.createWatchingPattern(backgroundMonitor.beginsPattern);
const ends: IWatchingPattern | null = this.createWatchingPattern(backgroundMonitor.endsPattern);
internal.watching = {
activeOnStart: Types.isBoolean(backgroundMonitor.activeOnStart) ? backgroundMonitor.activeOnStart : false,
return;
}
this.error(localize('ProblemMatcherParser.problemPattern.watchingMatcher', 'A problem matcher must define both a begin pattern and an end pattern for watching.'));
}
private createWatchingPattern(external: string | Config.IWatchingPattern | undefined): IWatchingPattern | null {
private createRegularExpression(value: string | undefined): RegExp | null {
if (!value) {
return result;
}
try {
result = new RegExp(value);
result = from(osExternal.linux.problemMatcher, context);
} else if (external.problemMatcher) {
}
return result;
}
return ProblemMatcherKind.Array;
} else if (!Types.isUndefined(value)) {
} else {
return ProblemMatcherKind.Unknown;
}
return { errors: [nls.localize('ConfigurationParser.invalidVariableReference', 'Error: Invalid problemMatcher reference: {0}\n', value)] };
} else {
return { value: new ProblemMatcherParser(context.problemReporter).parse(json) };
}
}
}
const configProblemMatcher = ProblemMatcherConverter.fromWithOsConfig(external, context);
if (configProblemMatcher.value !== undefined) {
}
if (external.detail) {
result.detail = external.detail;
public get problemReporter(): IProblemReporter {
}
public info(message: string): void {