mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-31 22:58:18 +00:00
1.8 KiB
1.8 KiB
- Never assume, verify before claiming
- Use
make helpto list the available development targets - Keep PR descriptions minimal, no task lists
- Use Conventional Commits for commit messages and PR titles, plus Gitea's own
enhancetype for user-facing enhancements - Add an
Assisted-by: AGENT_NAME:MODEL_VERSIONtrailer to commit messages, neverCo-Authored-ByorSigned-off-by - Never rewrite git history unless asked. Use new commits and normal push for PR updates
- Include authorship attribution when writing issue and PR comments
- Comments: Write almost no new ones, keep them short, preferably same-line, explain why for a future reader. Never narrate code, the current change or prompt. Preserve existing comments when they still apply.
- Add the current year to copyright headers of new
.gofiles - Leave no trailing whitespace in any edited file
- In TS, use
!instead of?./??when a value always exists - Prefer
tw-*utilities over inlinestyle, andflex-*helpers over per-childtw-ml-*/tw-mr-*margins, falling back totw-*when specificity requires!important - Run
make fmtafter.goedits,make tidyaftergo.modedits - Lint what changed with
make lint-go,lint-js,lint-cssorlint-templates - Run single Go tests with
go test -run '^TestName$' ./modulepath/ - Run single TS test files with
pnpm exec vitest <path-filter> - Run single Playwright e2e test files with
GITEA_TEST_E2E_FLAGS='<filepath>' make test-e2e - Write the fewest, fastest tests covering the behavior. Prefer extending an existing test before adding a new one. Avoid
sleepand similar mechanisms - Prefer unit tests when logic is testable in isolation, aim for sub-2s local runtime per integration test and sub-4s per e2e test
- Prefer semantic locators in e2e tests