Skip to content

Commit

Permalink
fix #25 (requires workspace-d update)
Browse files Browse the repository at this point in the history
  • Loading branch information
WebFreak001 committed Jan 29, 2016
1 parent acc0750 commit 24d1246
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/workspace-d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import * as ChildProcess from "child_process"
import * as vscode from "vscode"
import * as path from "path"
import * as fs from "fs"
import { EventEmitter } from "events"
import { DlangUIHandler } from "./dlangui"

function config() {
return vscode.workspace.getConfiguration("d");
}

const TARGET_VERSION = [2, 3, 0];
const TARGET_VERSION = [2, 3, 1];

export class WorkspaceD extends EventEmitter implements
vscode.CompletionItemProvider,
Expand Down Expand Up @@ -251,7 +252,8 @@ export class WorkspaceD extends EventEmitter implements
return new Promise((resolve, reject) => {
if (!self.dscannerReady)
return resolve(null);
self.request({ cmd: "dscanner", subcmd: "lint", file: document.uri.fsPath }).then(issues => {
let useProjectIni = fs.existsSync(path.join(self.projectRoot, "dscanner.ini"));
self.request({ cmd: "dscanner", subcmd: "lint", file: document.uri.fsPath, ini: useProjectIni ? path.join(self.projectRoot, "dscanner.ini") : "" }).then(issues => {
let diagnostics: vscode.Diagnostic[] = [];
if (issues && issues.length)
issues.forEach(element => {
Expand Down

0 comments on commit 24d1246

Please sign in to comment.