chore(process): add zero-warnings policy to pr-push and pr-review

- pr-push step 1b: lint check before pushing (gdlint, clippy, ruff)
- pr-review step 0c: check warning count before spawning reviewers
- Added .gdlintrc with max-line-length: 120
- Created ticket #783 for Sprint 31: clean up existing 253 warnings
- Updated #780 with edge visibility rule (show edges only for selected system)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-05 08:39:50 +02:00
co-authored by Claude Opus 4.6
parent 469114cb0e
commit 4628458ab0
4 changed files with 89 additions and 1 deletions
+29 -1
View File
@@ -34,7 +34,35 @@ git branch --show-current
If on `main`, stop: "You're on main. Switch to a team branch first."
### 1b. Runtime smoke test (MANDATORY)
### 1b. Zero warnings policy (MANDATORY)
Before pushing, verify the branch has **zero lint warnings**. Any warning
must be either fixed or suppressed with a commented justification.
**For client/visual branches:**
```bash
gdlint client/scripts/ client/ui/ 2>&1
```
If warnings remain, fix them before pushing. For warnings that cannot be
fixed (e.g. intentional long lines in data literals), add a `# gdlint:
ignore` comment with a reason.
**For server branches:**
```bash
cargo clippy -- -D warnings 2>&1
```
**For CI/tooling branches:**
```bash
ruff check tooling/ 2>&1
```
The goal is zero warnings in the pre-push output. Advisory warnings that
the pre-push hook reports as "(advisory, not blocking)" should still be
zero — they are advisory only because we haven't enforced them yet.
### 1c. Runtime smoke test (MANDATORY)
Before pushing, verify the game actually runs. This is non-negotiable —
Sprint 28 proved that code review without runtime testing misses critical
+13
View File
@@ -47,6 +47,19 @@ godot --headless --path client --quit 2>&1 | grep -i "SCRIPT ERROR"
If script errors appear in the branch diff files, flag them immediately
before spawning reviewers — no point reviewing code that doesn't parse.
### 0c. Zero warnings check
The project enforces a **zero warnings policy**. Before spawning reviewers,
check if the branch introduces lint warnings:
- **client/visual:** `gdlint client/scripts/ client/ui/` should report 0 issues
- **server:** `cargo clippy -- -D warnings` should be clean
- **ci/tooling:** `ruff check tooling/` should be clean
If warnings exist, note the count in the review output. Reviewers should
flag any **new** warnings introduced by the branch as `warning` severity.
Pre-existing warnings are not PR blockers but should be tracked for cleanup.
### 1. Determine the branch to review
If the user provided a branch name as argument, use it. Otherwise list open