build(server): lint:mcp-zod counts a z. call that a line break splits from its dot

Prettier breaks a long schema into z on one line and .object( on the next,
which the count read as nothing: formatting the tool files would have taken
134 hand-written fields out of the tally. Whitespace before the dot counts
now. Four files already held such a split call, so their entries rise to
what they really hold (atlas 23, doc-sync 1, help 4, transit 16).
This commit is contained in:
Maurice
2026-10-10 20:49:22 +02:00
parent 0903dcd5ab
commit 5c198f2848
3 changed files with 13 additions and 4 deletions
@@ -65,6 +65,12 @@ describe('the counters', () => {
expect(countInlineZod(`${Z}object({ a: ${Z}string(), b: idSchema, c: fizz.x })`)).toBe(2);
});
it('ENV-RATCHET-001b: counts a z. call Prettier broke across lines', () => {
expect(countInlineZod(`const s = z
.object({ a: idSchema })
.strict();`)).toBe(1);
});
it('ENV-RATCHET-002: counts the result envelope and HTTP in a service, not a 2xx status', () => {
expect(
countServiceIdioms(`return { error: 'x', ${STATUS} };\nthrow ${HTTP}{}, 400);\nreturn { status: 200 };`),