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:
@@ -34,7 +34,35 @@ git branch --show-current
|
|||||||
|
|
||||||
If on `main`, stop: "You're on main. Switch to a team branch first."
|
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 —
|
Before pushing, verify the game actually runs. This is non-negotiable —
|
||||||
Sprint 28 proved that code review without runtime testing misses critical
|
Sprint 28 proved that code review without runtime testing misses critical
|
||||||
|
|||||||
@@ -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
|
If script errors appear in the branch diff files, flag them immediately
|
||||||
before spawning reviewers — no point reviewing code that doesn't parse.
|
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
|
### 1. Determine the branch to review
|
||||||
|
|
||||||
If the user provided a branch name as argument, use it. Otherwise list open
|
If the user provided a branch name as argument, use it. Otherwise list open
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
class-definitions-order:
|
||||||
|
- tools
|
||||||
|
- classnames
|
||||||
|
- extends
|
||||||
|
- docstrings
|
||||||
|
- signals
|
||||||
|
- enums
|
||||||
|
- consts
|
||||||
|
- staticvars
|
||||||
|
- exports
|
||||||
|
- pubvars
|
||||||
|
- prvvars
|
||||||
|
- onreadypubvars
|
||||||
|
- onreadyprvvars
|
||||||
|
- others
|
||||||
|
class-load-variable-name: (([A-Z][a-z0-9]*)+|_?[a-z][a-z0-9]*(_[a-z0-9]+)*)
|
||||||
|
class-name: ([A-Z][a-z0-9]*)+
|
||||||
|
class-variable-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)*
|
||||||
|
comparison-with-itself: null
|
||||||
|
constant-name: _?[A-Z][A-Z0-9]*(_[A-Z0-9]+)*
|
||||||
|
disable: []
|
||||||
|
duplicated-load: null
|
||||||
|
enum-element-name: '[A-Z][A-Z0-9]*(_[A-Z0-9]+)*'
|
||||||
|
enum-name: ([A-Z][a-z0-9]*)+
|
||||||
|
excluded_directories: !!set
|
||||||
|
.git: null
|
||||||
|
expression-not-assigned: null
|
||||||
|
function-argument-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)*
|
||||||
|
function-arguments-number: 10
|
||||||
|
function-name: (_on_([A-Z][a-z0-9]*)+(_[a-z0-9]+)*|_?[a-z][a-z0-9]*(_[a-z0-9]+)*)
|
||||||
|
function-preload-variable-name: ([A-Z][a-z0-9]*)+
|
||||||
|
function-variable-name: '[a-z][a-z0-9]*(_[a-z0-9]+)*'
|
||||||
|
load-constant-name: (([A-Z][a-z0-9]*)+|_?[A-Z][A-Z0-9]*(_[A-Z0-9]+)*)
|
||||||
|
loop-variable-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)*
|
||||||
|
max-file-lines: 1000
|
||||||
|
max-line-length: 120
|
||||||
|
max-public-methods: 20
|
||||||
|
max-returns: 6
|
||||||
|
mixed-tabs-and-spaces: null
|
||||||
|
no-elif-return: null
|
||||||
|
no-else-return: null
|
||||||
|
signal-name: '[a-z][a-z0-9]*(_[a-z0-9]+)*'
|
||||||
|
sub-class-name: _?([A-Z][a-z0-9]*)+
|
||||||
|
tab-characters: 1
|
||||||
|
trailing-whitespace: null
|
||||||
|
unnecessary-pass: null
|
||||||
|
unused-argument: null
|
||||||
Binary file not shown.
Reference in New Issue
Block a user