Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass a semicolon-delimited list of files excluded from VS Code. #2171

Merged
merged 8 commits into from
May 29, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix tests
  • Loading branch information
Ravi Chande committed May 29, 2019
commit 9117912fc3994cc99c9c64a07920d6941d268223
21 changes: 15 additions & 6 deletions src/omnisharp/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ export class Options {
public defaultLaunchSolution?: string,
public monoPath?: string,
public excludePaths?: string[],
public maxProjectFileCountForDiagnosticAnalysis?: number | null) { }
;
public maxProjectFileCountForDiagnosticAnalysis?: number | null)
{
}

public static Read(vscode: vscode): Options {
// Extra effort is taken below to ensure that legacy versions of options
Expand Down Expand Up @@ -86,13 +87,21 @@ export class Options {

const maxProjectFileCountForDiagnosticAnalysis = csharpConfig.get<number | null>('maxProjectFileCountForDiagnosticAnalysis', 1000);

let excludeFilesOption = vscode.workspace.getConfiguration().get<{ [i: string]: boolean }>('files.exclude');
let workspaceConfig = vscode.workspace.getConfiguration();
let excludePaths = [];
for (let field in excludeFilesOption) {
if (excludeFilesOption[field]) {
excludePaths.push(field);
if (workspaceConfig)
{
let excludeFilesOption = workspaceConfig.get<{ [i: string]: boolean }>('files.exclude');
if (excludeFilesOption)
{
for (let field in excludeFilesOption) {
if (excludeFilesOption[field]) {
excludePaths.push(field);
}
}
}
}


return new Options(
path,
Expand Down