Merge pull request #288 from kas-luthor/master

Look for .editorconfig in cwd and parent directories …
merged-on-behalf-of: Brian Schott <Hackerpilot@users.noreply.github.com>
This commit is contained in:
The Dlang Bot 2017-09-01 23:22:04 +02:00 committed by GitHub
commit 45c2a961a6
1 changed files with 9 additions and 1 deletions

View File

@ -146,13 +146,21 @@ else
{
import std.file : getcwd;
auto cwdDummyPath = buildPath(getcwd(), "dummy.d");
Config config;
config.initializeWithDefaults();
if (explicitConfigDir != "")
{
config.merge(explicitConfig, buildPath(explicitConfigDir, "dummy.d"));
}
config.merge(optConfig, buildPath(getcwd(), "dummy.d"));
else
{
Config fileConfig = getConfigFor!Config(getcwd());
fileConfig.pattern = "*.d";
config.merge(fileConfig, cwdDummyPath);
}
config.merge(optConfig, cwdDummyPath);
if (!config.isValid())
return 1;
ubyte[4096] inputBuffer;