mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-02-10 04:03:41 +01:00
1.5 KiB
1.5 KiB
Pre-Edit Checklist
READ THIS BEFORE MODIFYING ANY FILE.
Quick Rules (memorize these)
- No
varexcept for:int,string,bool,double,float,decimal,char,byte - Use
new ()notnew TypeName()when type is on left side - Use
[...]notnew () { ... }for collections - SubView/SuperView - never say "child", "parent", or "container"
- Unused lambda params - use
_discard:(_, _) => { } - Local functions - use camelCase:
void myLocalFunc () - Backing fields - place immediately before their property (ReSharper bug, must do manually)
- ReShaper Formatting - run ReSharper code cleanup with "Full Cleanup" profile (not the built-in one).
Before Each File Edit
Ask yourself:
- Am I using explicit types (not var)?
- Am I using target-typed new ()?
- Am I using collection expressions []?
- Are my lambda parameters discards if unused?
- Am I using correct terminology (SubView, not child)?
If Unsure
Re-read the relevant rule file in .claude/rules/:
type-declarations.md- var vs explicit typestarget-typed-new.md- new() syntaxterminology.md- SubView/SuperView termsevent-patterns.md- lambdas, closures, handlerscollection-expressions.md- [...] syntaxcwp-pattern.md- Cancellable Workflow Patterncode-layout.md- backing fields, member ordering
Task-Specific Guides
Check .claude/tasks/ for task-specific checklists:
build-app.md- Building applications with Terminal.Gui
Check .claude/cookbook/ for common UI patterns.