Skip to content

Commit

Permalink
Trivial: Remove a dependency to std.path
Browse files Browse the repository at this point in the history
Use the Dub versions instead.
  • Loading branch information
Geod24 committed Dec 26, 2023
1 parent a86d81c commit 3f2a3df
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions source/dub/dub.d
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,6 @@ class Dub {
/** Executes D-Scanner tests on the current project. **/
void lintProject(string[] args)
{
import std.path : buildPath, buildNormalizedPath;

if (m_dryRun) return;

auto tool = "dscanner";
Expand All @@ -744,14 +742,14 @@ class Dub {
auto cfgs = m_project.getPackageConfigs(settings.platform, null, true);
auto buildSettings = dependencyPackage.getBuildSettings(settings.platform, cfgs[dependencyPackage.name]);
foreach (importPath; buildSettings.importPaths) {
settings.runArgs ~= ["-I", buildNormalizedPath(dependencyPackage.path.toNativeString(), importPath.idup)];
settings.runArgs ~= ["-I", (dependencyPackage.path ~ importPath).toNativeString()];
}
foreach (cimportPath; buildSettings.cImportPaths) {
settings.runArgs ~= ["-I", buildNormalizedPath(dependencyPackage.path.toNativeString(), cimportPath.idup)];
settings.runArgs ~= ["-I", (dependencyPackage.path ~ cimportPath).toNativeString()];
}
}

string configFilePath = buildPath(m_project.rootPackage.path.toNativeString(), "dscanner.ini");
string configFilePath = (m_project.rootPackage.path ~ "dscanner.ini").toNativeString();
if (!args.canFind("--config") && exists(configFilePath)) {
settings.runArgs ~= ["--config", configFilePath];
}
Expand Down

0 comments on commit 3f2a3df

Please sign in to comment.