Merge pull request #119040 from jeanp413/fix-103631

Fix problems pane ignores `files.exclude` option
This commit is contained in:
Sandeep Somavarapu 2021-04-23 10:12:57 +02:00 committed by GitHub
commit 77ac0dc1a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,6 +70,15 @@ export class FilterOptions {
const filesExcludeByRoot = Array.isArray(filesExclude) ? filesExclude : [];
const excludesExpression: IExpression = Array.isArray(filesExclude) ? getEmptyExpression() : filesExclude;
for (const { expression } of filesExcludeByRoot) {
for (const pattern of Object.keys(expression)) {
if (!pattern.endsWith('/**')) {
// Append `/**` to pattern to match a parent folder #103631
expression[`${strings.rtrim(pattern, '/')}/**`] = expression[pattern];
}
}
}
const negate = filter.startsWith('!');
this.textFilter = { text: (negate ? strings.ltrim(filter, '!') : filter).trim(), negate };
const includeExpression: IExpression = getEmptyExpression();