mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-23 14:45:46 +00:00
fix(lint): skip heavy-check lock for extra metadata commands
This commit is contained in:
@@ -92,7 +92,18 @@ export function shouldAcquireLocalHeavyCheckLockForOxlint(
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args.some((arg) => arg === "--help" || arg === "-h" || arg === "--version" || arg === "-V")) {
|
||||
if (
|
||||
args.some(
|
||||
(arg) =>
|
||||
arg === "--help" ||
|
||||
arg === "-h" ||
|
||||
arg === "--version" ||
|
||||
arg === "-V" ||
|
||||
arg === "--rules" ||
|
||||
arg === "--print-config" ||
|
||||
arg === "--init",
|
||||
)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -125,7 +136,12 @@ export function shouldAcquireLocalHeavyCheckLockForTsgo(args, env = process.env)
|
||||
|
||||
return !args.some(
|
||||
(arg) =>
|
||||
arg === "--help" || arg === "-h" || arg === "--version" || arg === "-v" || arg === "--init",
|
||||
arg === "--help" ||
|
||||
arg === "-h" ||
|
||||
arg === "--version" ||
|
||||
arg === "-v" ||
|
||||
arg === "--init" ||
|
||||
arg === "--showConfig",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ describe("local-heavy-check-runtime", () => {
|
||||
expect(shouldAcquireLocalHeavyCheckLockForTsgo(["--version"])).toBe(false);
|
||||
expect(shouldAcquireLocalHeavyCheckLockForTsgo(["-v"])).toBe(false);
|
||||
expect(shouldAcquireLocalHeavyCheckLockForTsgo(["--init"])).toBe(false);
|
||||
expect(shouldAcquireLocalHeavyCheckLockForTsgo(["--showConfig"])).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps the heavy-check lock for real tsgo runs", () => {
|
||||
@@ -256,6 +257,9 @@ describe("local-heavy-check-runtime", () => {
|
||||
expect(shouldAcquireLocalHeavyCheckLockForOxlint(["-h"])).toBe(false);
|
||||
expect(shouldAcquireLocalHeavyCheckLockForOxlint(["--version"])).toBe(false);
|
||||
expect(shouldAcquireLocalHeavyCheckLockForOxlint(["-V"])).toBe(false);
|
||||
expect(shouldAcquireLocalHeavyCheckLockForOxlint(["--rules"])).toBe(false);
|
||||
expect(shouldAcquireLocalHeavyCheckLockForOxlint(["--print-config"])).toBe(false);
|
||||
expect(shouldAcquireLocalHeavyCheckLockForOxlint(["--init"])).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps the heavy-check lock for directory targets and broad oxlint runs", () => {
|
||||
|
||||
Reference in New Issue
Block a user