chore: Enable "curly" rule to avoid single-statement if confusion/errors.

This commit is contained in:
cpojer
2026-01-31 16:19:20 +09:00
parent 009b16fab8
commit 5ceff756e1
1266 changed files with 27871 additions and 9393 deletions

View File

@@ -87,7 +87,9 @@ describe("sessions_send gateway loopback", () => {
});
const tool = createOpenClawTools().find((candidate) => candidate.name === "sessions_send");
if (!tool) throw new Error("missing sessions_send tool");
if (!tool) {
throw new Error("missing sessions_send tool");
}
const result = await tool.execute("call-loopback", {
sessionKey: "main",
@@ -152,7 +154,9 @@ describe("sessions_send label lookup", () => {
});
const tool = createOpenClawTools().find((candidate) => candidate.name === "sessions_send");
if (!tool) throw new Error("missing sessions_send tool");
if (!tool) {
throw new Error("missing sessions_send tool");
}
// Send using label instead of sessionKey
const result = await tool.execute("call-by-label", {
@@ -172,7 +176,9 @@ describe("sessions_send label lookup", () => {
it("returns error when label not found", { timeout: 60_000 }, async () => {
const tool = createOpenClawTools().find((candidate) => candidate.name === "sessions_send");
if (!tool) throw new Error("missing sessions_send tool");
if (!tool) {
throw new Error("missing sessions_send tool");
}
const result = await tool.execute("call-missing-label", {
label: "nonexistent-label",
@@ -186,7 +192,9 @@ describe("sessions_send label lookup", () => {
it("returns error when neither sessionKey nor label provided", { timeout: 60_000 }, async () => {
const tool = createOpenClawTools().find((candidate) => candidate.name === "sessions_send");
if (!tool) throw new Error("missing sessions_send tool");
if (!tool) {
throw new Error("missing sessions_send tool");
}
const result = await tool.execute("call-no-key", {
message: "hello",