Skip to content

Commit 24d1246

Browse files
author
WebFreak001
committed
fix #25 (requires workspace-d update)
1 parent acc0750 commit 24d1246

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/workspace-d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import * as ChildProcess from "child_process"
22
import * as vscode from "vscode"
33
import * as path from "path"
4+
import * as fs from "fs"
45
import { EventEmitter } from "events"
56
import { DlangUIHandler } from "./dlangui"
67

78
function config() {
89
return vscode.workspace.getConfiguration("d");
910
}
1011

11-
const TARGET_VERSION = [2, 3, 0];
12+
const TARGET_VERSION = [2, 3, 1];
1213

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

0 commit comments

Comments
 (0)