Skip to content

Commit

Permalink
update_format: dfmt 0.14.2
Browse files Browse the repository at this point in the history
Signed-off-by: Ikey Doherty <ikey@serpentos.com>
  • Loading branch information
ikeycode committed Jan 13, 2023
1 parent d236088 commit ca9e003
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 30 deletions.
8 changes: 4 additions & 4 deletions source/boulder/controller.d
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ public final class Controller : StageContext
*/
auto bc = buildContext();
foreach (scr; [
recipe.rootBuild.stepSetup, recipe.rootBuild.stepBuild,
recipe.rootBuild.stepCheck, recipe.rootBuild.stepInstall,
recipe.rootBuild.stepWorkload
])
recipe.rootBuild.stepSetup, recipe.rootBuild.stepBuild,
recipe.rootBuild.stepCheck, recipe.rootBuild.stepInstall,
recipe.rootBuild.stepWorkload
])
{
ScriptBuilder script;
bc.spec = recipe;
Expand Down
10 changes: 5 additions & 5 deletions source/boulder/stages/configure_root.d
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public static immutable(Stage) stageConfigureRoot = Stage("configure-root", (Sta

info(format!"Updating index for `%s` at `%s`"(collection.id, realPath));
auto idxResult = executeCommand(context.mossBinary, [
"index", profilePath
], env);
"index", profilePath
], env);

bool failed;
idxResult.match!((i) { failed = i != 0; }, (ExecutionError e) {
Expand All @@ -69,9 +69,9 @@ public static immutable(Stage) stageConfigureRoot = Stage("configure-root", (Sta
}

auto result = executeCommand(context.mossBinary, [
"-y", "ar", "-D", context.job.hostPaths.rootfs, collection.id,
collection.uri, "-p", to!string(collection.priority)
], env);
"-y", "ar", "-D", context.job.hostPaths.rootfs, collection.id,
collection.uri, "-p", to!string(collection.priority)
], env);
bool failed;
result.match!((i) { failed = i != 0; }, (ExecutionError e) {
error(format!"Execution error: %s"(e.toString));
Expand Down
4 changes: 2 additions & 2 deletions source/boulder/stages/populate_root.d
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ public static immutable(Stage) stagePopulateRoot = Stage("populate-root", (Stage
string[string] env;
env["PATH"] = "/usr/bin";
auto result = executeCommand(context.mossBinary, [
"-y", "install", "-D", context.job.hostPaths.rootfs
] ~ requiredInstalled, env);
"-y", "install", "-D", context.job.hostPaths.rootfs
] ~ requiredInstalled, env);
return result.match!((i) => i == 0 ? StageReturn.Success
: StageReturn.Failure, (ExecutionError e) => StageReturn.Failure);
});
4 changes: 2 additions & 2 deletions source/drafter/build/meson.d
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ static private AnalysisReturn scanMeson(scope Analyser an, ref FileInfo inpath)
* Handler for meson files
*/
public static AnalysisChain mesonChain = AnalysisChain("meson", [
&acceptMeson, &scanMeson
], 20);
&acceptMeson, &scanMeson
], 20);

/**
* Build instructions
Expand Down
4 changes: 2 additions & 2 deletions source/drafter/build/python.d
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ static private AnalysisReturn acceptPython(scope Analyser an, ref FileInfo inpat
* Handler for python projects
*/
public static AnalysisChain pythonChain = AnalysisChain("python", [
&acceptPython
], 20);
&acceptPython
], 20);

/**
* Python PEP517 Build (pyproject.toml/setup.cfg)
Expand Down
10 changes: 5 additions & 5 deletions source/drafter/license/engine.d
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ static private AnalysisReturn scanLicenseFile(scope Analyser an, ref FileInfo fi
* Incorporate licenseChain into analyzer to gain automatic license scanning
*/
public static AnalysisChain licenseChain = AnalysisChain("licenseFiles", [
&scanLicenseFile
], 10);
&scanLicenseFile
], 10);

/**
* Used internally as a return type for license matching
Expand Down Expand Up @@ -210,8 +210,8 @@ public final class Engine

/* Do we have a valid match for the first field ($SPDX.txt) ? (i.e. REUSE) */
const auto baseToSuffix = join(splits.length > 1 ? splits[0 .. $ - 1] : [
splits[0]
], ".");
splits[0]
], ".");
auto identicalIDs = licenses.filter!((m) => m.identifier.toLower == baseToSuffix);
if (!identicalIDs.empty)
{
Expand Down Expand Up @@ -259,7 +259,7 @@ private:
double[] chunkCounts;
context.license.textBody.chunks(ChunkSize)
.lockstep(context.input.chunks(ChunkSize)).each!((a,
b) => chunkCounts ~= levenCount(a, b));
b) => chunkCounts ~= levenCount(a, b));
auto avg = mean!double(chunkCounts);
return LicenseResult(context.license.identifier, avg);
}
Expand Down
8 changes: 4 additions & 4 deletions source/mason/build/analysers/elves.d
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public void copyElfDebug(scope Analyser analyser, ref FileInfo fileInfo)

/* Execute, TODO: Fix environment */
auto ret = executeCommand(command, [
"--only-keep-debug", fileInfo.fullPath, debugInfoPath
], null);
"--only-keep-debug", fileInfo.fullPath, debugInfoPath
], null);
auto code = ret.match!((err) {
error(format!"debuginfo failure: %s"(err.toString));
return -1;
Expand All @@ -85,8 +85,8 @@ public void copyElfDebug(scope Analyser analyser, ref FileInfo fileInfo)
/* GNU debuglink. */
auto commandLink = useLLVM ? "/usr/bin/llvm-objcopy" : "/usr/bin/objcopy";
auto linkRet = executeCommand(commandLink, [
"--add-gnu-debuglink", debugInfoPath, fileInfo.fullPath
], null);
"--add-gnu-debuglink", debugInfoPath, fileInfo.fullPath
], null);
code = linkRet.match!((err) {
error(format!"debuginfo:link failure: %s"(err.toString));
return -1;
Expand Down
12 changes: 6 additions & 6 deletions source/mason/build/builder.d
Original file line number Diff line number Diff line change
Expand Up @@ -314,18 +314,18 @@ private:

/* Handle ELF files */
AnalysisChain("elves", [
&acceptElfFiles, &scanElfFiles, &deferElfInclusion,
], 90),
&acceptElfFiles, &scanElfFiles, &deferElfInclusion,
], 90),

/* Handle pkgconfig files */
AnalysisChain("pkgconfig", [
&acceptPkgconfigFiles, &handlePkgconfigFiles, &includeFile
], 50),
&acceptPkgconfigFiles, &handlePkgconfigFiles, &includeFile
], 50),

/* Handle cmake files */
AnalysisChain("cmake", [
&acceptCmakeFiles, &handleCmakeFiles, &includeFile
], 50),
&acceptCmakeFiles, &handleCmakeFiles, &includeFile
], 50),

/* Default inclusion policy */
AnalysisChain("default", [&includeFile], 0),
Expand Down

0 comments on commit ca9e003

Please sign in to comment.