mirror of
https://github.com/gogs/gogs.git
synced 2026-01-24 08:09:15 +01:00
chore: update AGENTS.md
[skip ci]
This commit is contained in:
15
AGENTS.md
15
AGENTS.md
@@ -1,11 +1,20 @@
|
||||
## Core principles
|
||||
|
||||
- When you see changes made outside your knowledge, use the current version as your new starting point. Do not blindly overwrite those changes or you suck. Even if you have to update the code, please respect the god damn pattern in the surrounding context!
|
||||
- When you see changes made outside your knowledge, use the current version as your new starting point. Do not blindly overwrite those changes or you suck. Even if you have to update the code, always respect the god damn pattern in the surrounding context!
|
||||
|
||||
## Style and mechanics
|
||||
|
||||
This applies to all texts, including but not limited to UI, documentation, code comments.
|
||||
|
||||
- Always use sentence case. Preserve original casing for brand names.
|
||||
- Always end with a period for a full sentence.
|
||||
- Use sentence case. Preserve original casing for brand names.
|
||||
- End with a period for a full sentence.
|
||||
- Do not add comments that repeat what the code is doing, always prefer more descriptive names. Do add comments for intentions that aren't obvious via reading the code alone. This rule takes precedence over matching existing patterns.
|
||||
|
||||
## Coding guidelines
|
||||
|
||||
- Use `github.com/cockroachdb/errors` for error handling.
|
||||
- Use `github.com/stretchr/testify` for assertions in tests. Be mindful about the choice of `require` and `assert`, the former should be used when the test cannot proceed meaningfully after a failed assertion.
|
||||
|
||||
## Tool-use guidance
|
||||
|
||||
- Use `gh` CLI to access information on github.com that is not publicly available.
|
||||
|
||||
Reference in New Issue
Block a user