Skip to content

Commit

Permalink
plugin: findFiles should handle ignored files
Browse files Browse the repository at this point in the history
The following commit updates the `findFiles` plugin API to respect
`exclude: null` which indicates that the search should yield results in
all files (no exclude or ignored constraints).

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
  • Loading branch information
vince-fugnitto committed Sep 1, 2020
1 parent e198c7c commit fda1279
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/plugin-ext/src/main/browser/workspace-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,14 @@ export class WorkspaceMainImpl implements WorkspaceMain, Disposable {
for (const rootUri of rootUris) {
roots[rootUri] = {};
}
const opts: FileSearchService.Options = { rootOptions: roots };
const useGitIgnore: boolean = !(
typeof excludePatternOrDisregardExcludes === 'boolean' &&
excludePatternOrDisregardExcludes === false
);
const opts: FileSearchService.Options = {
rootOptions: roots,
useGitIgnore
};
if (includePattern) {
opts.includePatterns = [includePattern];
}
Expand Down

0 comments on commit fda1279

Please sign in to comment.