Skip to content

Commit 90137a2

Browse files
dschoGit for Windows Build Agent
authored andcommitted
fixup! Add an AGENTS.md file to help with AI-assisted debugging/development
AGENTS.md: add pre-commit checklist for lint checks Bundle the existing ASCII-only, 80-column, and whitespace validation recipes into a "pre-commit checklist" block that agents should run before every commit. The individual recipes already existed in the Coding Conventions section but were presented as reference material rather than as an actionable workflow step. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Assisted-by: Claude Opus 4.6
1 parent 52bb943 commit 90137a2

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,22 @@ terminal sessions of yore:
831831
- **Tabs for indentation**: The codebase uses tabs, not spaces.
832832
- **No trailing whitespace**: Clean up your lines.
833833

834+
**Pre-commit checklist.** Run all three checks before every commit:
835+
836+
```bash
837+
git diff --check &&
838+
git diff --no-color | LC_ALL=C grep '[^ -~]' &&
839+
echo "ERROR: non-ASCII characters found" &&
840+
git diff --no-color | grep '^+' | sed 's/\t/ /g' |
841+
grep '.\{82\}' &&
842+
echo "ERROR: lines exceed 80 columns"
843+
```
844+
845+
The first command catches whitespace errors. If either of the latter
846+
two produces output, fix the offending lines before committing. Note
847+
that these checks apply to commit messages as well (wrap at 76 columns
848+
for messages, 80 for code).
849+
834850
See `Documentation/CodingGuidelines` for the full set of conventions.
835851

836852
### strbuf patterns

0 commit comments

Comments
 (0)