Skip to content

Commit

Permalink
Merge pull request microsoft#119040 from jeanp413/fix-103631
Browse files Browse the repository at this point in the history
Fix problems pane ignores `files.exclude` option
  • Loading branch information
sandy081 authored Apr 23, 2021
2 parents 9701c05 + bfac489 commit 77ac0dc
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 77ac0dc

Please sign in to comment.