Skip to content

Commit 7b8ecb1

Browse files
committed
fix(doctor): keep shell completion lint informational
1 parent e1a55b3 commit 7b8ecb1

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/commands/doctor-completion.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe("shell completion health mapping", () => {
2323
expect(shellCompletionStatusToHealthFindings(current)).toEqual([
2424
expect.objectContaining({
2525
checkId: "core/doctor/shell-completion",
26-
severity: "warning",
26+
severity: "info",
2727
path: "shellCompletion.zsh",
2828
}),
2929
]);
@@ -48,6 +48,7 @@ describe("shell completion health mapping", () => {
4848

4949
expect(shellCompletionStatusToHealthFindings(current)).toEqual([
5050
expect.objectContaining({
51+
severity: "info",
5152
message: expect.stringContaining("cache is missing"),
5253
fixHint: expect.stringContaining("openclaw doctor --fix"),
5354
}),

src/commands/doctor-completion.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function shellCompletionStatusToHealthFindings(
9595
return [
9696
{
9797
checkId,
98-
severity: "warning",
98+
severity: "info",
9999
message: `Your ${status.shell} profile uses slow dynamic completion (source <(...)).`,
100100
path,
101101
fixHint: "Run `openclaw doctor --fix` to upgrade to cached completion.",
@@ -106,7 +106,7 @@ export function shellCompletionStatusToHealthFindings(
106106
return [
107107
{
108108
checkId,
109-
severity: "warning",
109+
severity: "info",
110110
message: `Shell completion is configured in your ${status.shell} profile but the cache is missing.`,
111111
path,
112112
fixHint: `Run \`openclaw completion --write-state\` or \`openclaw doctor --fix\` to regenerate ${status.cachePath}.`,

src/flows/doctor-lint-flow.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,10 @@ describe("exitCodeFromFindings", () => {
9292
expect(exitCodeFromFindings(findings, "warning")).toBe(1);
9393
expect(exitCodeFromFindings(findings, "error")).toBe(0);
9494
});
95+
96+
it("does not fail default lint for informational findings", () => {
97+
const findings = [{ checkId: "a", severity: "info" as const, message: "info" }];
98+
99+
expect(exitCodeFromFindings(findings)).toBe(0);
100+
});
95101
});

0 commit comments

Comments
 (0)