From b4535adde425dfd528e5e69faf4634c917ff022f Mon Sep 17 00:00:00 2001 From: SirLouen Date: Mon, 30 Nov 2026 19:24:22 +0100 Subject: [PATCH] chore(ci): ask CodeRabbit to report names that do not say what they are --- .coderabbit.yaml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 5e9d9d70..6ca001b4 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -3,15 +3,29 @@ reviews: - path: "**/*.go" instructions: >- The only comment this repository allows is a docblock directly above a declaration. A - docblock starts with the name of what it documents, and states WHAT - that thing does and never how or why. Do not ask for inline comments, TODO markers, - or section markers. + docblock starts with the name of what it documents, and states WHAT that thing does and + never how or why. Do not ask for inline comments, TODO markers, or section markers. + Report every added or renamed name that does not say what the value is, or what the + function returns, checks or does: a prose word, a lone adjective or participle such as + held, said or plain, or a coined metaphor. A one or two letter name is fine for i, r, w, + ctx, t and receivers, or within about seven lines, and the further a name is used from + its declaration, the fuller it should be. - path: "**/*_test.go" instructions: >- Test functions here deliberately carry no doc comment. Their name states what they verify and every one of them follows that convention, so never ask for a doc comment on a function whose name begins with Test, Benchmark or Fuzz. Helper functions and methods in test files do carry a one line docblock, so a missing one there is worth reporting. + - path: "**/*.{ts,tsx}" + instructions: >- + Every comment sits directly above the declaration it documents and states WHAT it does, + never how or why. Functions carry TSDoc with @param and @returns where they apply. In + test files the test callbacks carry no comment, since the test title already says what is + verified, so ask only about helper functions there. Do not ask for inline comments or + TODO markers. Report every added or renamed name that does not say what the value is, or + what the function returns, checks or does: a prose word, a lone adjective or participle + such as held, said or plain, or a coined metaphor. A boolean reads as a yes or no + question, except HTML-style props such as disabled or open. - path: "**/*.sql" instructions: >- Migrations carry no comments of any kind, so never ask for one to be added. A down