Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravi Chande committed May 29, 2019
1 parent 6c2f1e0 commit 9117912
Showing 1 changed file with 15 additions and 6 deletions.
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

0 comments on commit 9117912

Please sign in to comment.