mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:50:44 +00:00
fix(lint): skip heavy-check lock for oxlint metadata
This commit is contained in:
@@ -92,6 +92,10 @@ export function shouldAcquireLocalHeavyCheckLockForOxlint(
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args.some((arg) => arg === "--help" || arg === "-h" || arg === "--version" || arg === "-V")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const separatorIndex = args.indexOf("--");
|
||||
const candidateArgs = (() => {
|
||||
if (separatorIndex !== -1) {
|
||||
|
||||
@@ -251,6 +251,13 @@ describe("local-heavy-check-runtime", () => {
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("skips the heavy-check lock for oxlint metadata commands", () => {
|
||||
expect(shouldAcquireLocalHeavyCheckLockForOxlint(["--help"])).toBe(false);
|
||||
expect(shouldAcquireLocalHeavyCheckLockForOxlint(["-h"])).toBe(false);
|
||||
expect(shouldAcquireLocalHeavyCheckLockForOxlint(["--version"])).toBe(false);
|
||||
expect(shouldAcquireLocalHeavyCheckLockForOxlint(["-V"])).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps the heavy-check lock for directory targets and broad oxlint runs", () => {
|
||||
const cwd = createTempDir("openclaw-oxlint-lock-keep-");
|
||||
fs.mkdirSync(path.join(cwd, "src"), { recursive: true });
|
||||
|
||||
Reference in New Issue
Block a user