Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading