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

Commit

Permalink
Made dscanner.ini path customizable
Browse files Browse the repository at this point in the history
  • Loading branch information
WebFreak001 committed Jan 29, 2016
1 parent 10a019b commit e962189
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import std.json;
import std.meta;
import std.conv;

static immutable Version = [2, 3, 0];
static immutable Version = [2, 3, 1];
__gshared Mutex writeMutex;

void sendFinal(int id, JSONValue value)
Expand Down
12 changes: 10 additions & 2 deletions source/com/dscanner.d
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,20 @@ import workspaced.api;
/// Returns: `[{file: string, line: int, column: int, type: string, description: string}]`
/// Call_With: `{"subcmd": "lint"}`
@arguments("subcmd", "lint")
@async void lint(AsyncCallback cb, string file)
@async void lint(AsyncCallback cb, string file, string ini = "dscanner.ini")
{
new Thread({
try
{
ProcessPipes pipes = raw([execPath, "-S", file, "--config", buildPath(cwd, "dscanner.ini")]);
auto args = [execPath, "-S", file];
if(ini && ini.length)
{
if(ini.isAbsolute)
args ~= ["--config", ini];
else
args ~= ["--config", buildPath(cwd, ini)];
}
ProcessPipes pipes = raw(args);
scope (exit)
pipes.pid.wait();
string[] res;
Expand Down

0 comments on commit e962189

Please sign in to comment.