fix: Be more explicit about coding quality
By making the AGENTS.md file more explicit about the code quality standards, it will hopefully result in cleaner code. There was a tendency to mask unused variables by prefixing them with a _ instead of removing them. That is not what I want: if it's unused, I want it gone.
This commit is contained in:
16
AGENTS.md
16
AGENTS.md
@@ -137,6 +137,7 @@ mod tests {
|
|||||||
- Keep core business logic separate from external integrations
|
- Keep core business logic separate from external integrations
|
||||||
- Use workspace dependencies consistently
|
- Use workspace dependencies consistently
|
||||||
- When working from a spec, update the spec with the current status as soon as you finish something
|
- When working from a spec, update the spec with the current status as soon as you finish something
|
||||||
|
- **MANDATORY**: After making ANY code change, complete the Post-Change Verification Checklist (see Code Quality section below)
|
||||||
|
|
||||||
### 2. Testing
|
### 2. Testing
|
||||||
- Write tests alongside code in `#[cfg(test)]` modules
|
- Write tests alongside code in `#[cfg(test)]` modules
|
||||||
@@ -149,9 +150,20 @@ mod tests {
|
|||||||
- Use `cargo fmt` for formatting
|
- Use `cargo fmt` for formatting
|
||||||
- Use `cargo clippy` for linting
|
- Use `cargo clippy` for linting
|
||||||
- Ensure documentation for public APIs
|
- Ensure documentation for public APIs
|
||||||
- _ALWAYS_ format and lint after making a change, and fix linting errors and warnings
|
- **MANDATORY: ALWAYS format and lint after making ANY change, and fix ALL linting errors and warnings**
|
||||||
- When a change is end-user visible, update the README.md. Use the README.md documentation guidelines
|
- When a change is end-user visible, update the README.md. Use the README.md documentation guidelines
|
||||||
- Always clean up unused code. No todo's or unused code is allowed after a change
|
- Always clean up unused code. No todo's or unused code is allowed after a change. Remove unused variables, functions, imports, etc. Do NOT hide unused code with underscores - delete it!
|
||||||
|
|
||||||
|
#### Post-Change Verification Checklist (MANDATORY)
|
||||||
|
After making ANY code change, you MUST run these commands and fix any issues:
|
||||||
|
|
||||||
|
1. **Format code**: `cargo fmt --all`
|
||||||
|
2. **Run linter**: `cargo clippy --all-targets --all-features -- -D warnings`
|
||||||
|
3. **Run tests**: `cargo test --workspace`
|
||||||
|
4. **Build project**: `cargo build --workspace`
|
||||||
|
5. **Clean up unused code**: Remove any unused variables, functions, imports, etc.
|
||||||
|
|
||||||
|
**FAILURE TO COMPLETE THIS CHECKLIST WILL RESULT IN CODE REJECTION**
|
||||||
|
|
||||||
### 4. Commit Standards
|
### 4. Commit Standards
|
||||||
- *Always* ensure the workspace compiles: `cargo build --workspace`
|
- *Always* ensure the workspace compiles: `cargo build --workspace`
|
||||||
|
|||||||
Reference in New Issue
Block a user