fix(clawsweeper): address review for automerge-openclaw-openclaw-84385 (validation-1)

This commit is contained in:
clawsweeper
2026-05-20 23:35:03 +00:00
parent da6464e683
commit 26816c18d6
2 changed files with 6 additions and 8 deletions
+3 -5
View File
@@ -67,9 +67,7 @@ export function shouldSkipAppLintForMissingSwiftlint(options = {}) {
const env = options.env ?? process.env;
const platform = options.platform ?? process.platform;
const swiftlintAvailable = options.swiftlintAvailable ?? executableExistsOnPath("swiftlint", env);
return (
isTruthyEnvFlag(env.OPENCLAW_TESTBOX_REMOTE_RUN) && platform !== "darwin" && !swiftlintAvailable
);
return platform !== "darwin" && !swiftlintAvailable;
}
export function shouldDelegateChangedCheckToCrabbox(argv = [], env = process.env) {
@@ -231,11 +229,11 @@ export function createChangedCheckPlan(result, options = {}) {
}
if (lanes.apps && shouldSkipAppLintForMissingSwiftlint({ ...options, env: baseEnv })) {
addCommand(
"lint apps (swiftlint unavailable in Testbox)",
"lint apps (swiftlint unavailable on this host)",
"node",
[
"-e",
"console.error('[check:changed] Swift app lint skipped: swiftlint is unavailable in this Linux Testbox; macOS CI owns SwiftLint coverage.')",
"console.error('[check:changed] Swift app lint skipped: swiftlint is unavailable on this non-macOS host; macOS CI owns SwiftLint coverage.')",
],
baseEnv,
);
+3 -3
View File
@@ -865,12 +865,12 @@ describe("scripts/changed-lanes", () => {
expect(plan.commands.map((command) => command.args[0])).not.toContain("tsgo:all");
});
it("keeps app lint explicit when Linux Testbox lacks SwiftLint", () => {
it("keeps app lint explicit when non-macOS hosts lack SwiftLint", () => {
const result = detectChangedLanes([
"apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift",
]);
const plan = createChangedCheckPlan(result, {
env: { OPENCLAW_TESTBOX_REMOTE_RUN: "1", PATH: "/usr/bin" },
env: { PATH: "/usr/bin" },
platform: "linux",
swiftlintAvailable: false,
});
@@ -881,7 +881,7 @@ describe("scripts/changed-lanes", () => {
expect(plan.commands.map((command) => command.args[0])).not.toContain("lint:apps");
expect(plan.commands).toContainEqual(
expect.objectContaining({
name: "lint apps (swiftlint unavailable in Testbox)",
name: "lint apps (swiftlint unavailable on this host)",
bin: "node",
}),
);