Skip to content
This repository was archived by the owner on Mar 1, 2022. It is now read-only.

Commit e962189

Browse files
author
WebFreak001
committed
Made dscanner.ini path customizable
1 parent 10a019b commit e962189

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

source/app.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import std.json;
1616
import std.meta;
1717
import std.conv;
1818

19-
static immutable Version = [2, 3, 0];
19+
static immutable Version = [2, 3, 1];
2020
__gshared Mutex writeMutex;
2121

2222
void sendFinal(int id, JSONValue value)

source/com/dscanner.d

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,20 @@ import workspaced.api;
3333
/// Returns: `[{file: string, line: int, column: int, type: string, description: string}]`
3434
/// Call_With: `{"subcmd": "lint"}`
3535
@arguments("subcmd", "lint")
36-
@async void lint(AsyncCallback cb, string file)
36+
@async void lint(AsyncCallback cb, string file, string ini = "dscanner.ini")
3737
{
3838
new Thread({
3939
try
4040
{
41-
ProcessPipes pipes = raw([execPath, "-S", file, "--config", buildPath(cwd, "dscanner.ini")]);
41+
auto args = [execPath, "-S", file];
42+
if(ini && ini.length)
43+
{
44+
if(ini.isAbsolute)
45+
args ~= ["--config", ini];
46+
else
47+
args ~= ["--config", buildPath(cwd, ini)];
48+
}
49+
ProcessPipes pipes = raw(args);
4250
scope (exit)
4351
pipes.pid.wait();
4452
string[] res;

0 commit comments

Comments
 (0)