]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
agents: Add a note about having the issue ID in test names
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 17 Apr 2026 19:59:11 +0000 (21:59 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 17 Apr 2026 19:59:11 +0000 (21:59 +0200)
AGENTS.md

index 42c0706b63779098a97620342e982f80833fca2c..9972596ac91beb185c658cd5a2c9e977bd0957a7 100644 (file)
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -9,6 +9,7 @@
 * This is a project with a long history; assume that a similiar problem has been solved before, look hard for helper functions before creating new ones.
 * In tests, use `qt` matchers (e.g. `b.Assert(err, qt.ErrorMatches, ...)`) instead of raw `if`/`t.Fatal` checks.
 * In tests, always use the latest Hugo specification, e.g. for layouts, it's `layouts/page.html` and not `layouts/_default/single.html`, `layouts/list.html` and not `layouts/_default/list.html`
+* Never name tests `TestIssue1234`; if this e.g. is about fixing an issue, use the issue ID as a suffix, as in `TestUpperCaseTitlesCreatesHavocIssue1234`. And note: No underscores in func names.
 * Brevity is good. This applies to code, comments and commit messages. Don't write a novel.
 * Use `./check.sh ./somepackage/...` when iterating.
 * Use `./check.sh` when you're done.