delta-misuse flags absolute position/rotation assignments in _process

Aperta Adatta ai principianti
#107 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
88/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
testing-qa

Direzione di ricerca

Leggi src/lint/rules/delta-misuse.ts intorno alle righe 101–105 e confronta il ramo delle informazioni sulla posizione/rotazione con il ramo della velocità descritto nell’issue. Esegui la riproduzione e i test pertinenti in test/rules.test.ts usando npm run build && npm test. Il lavoro è completato quando le assegnazioni assolute semplici non producono segnalazioni, mentre position += speed in _process continua a essere segnalato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug good first issue severity: low

Summary

delta-misuse reports the info "motion becomes frame-rate dependent" for plain absolute assignments in _process, such as position = get_global_mouse_position() or rotation = 0.0. These do not accumulate per frame, so they are not frame-rate dependent.

Where

  • src/lint/rules/delta-misuse.ts:101-105 (the info branch does not check stmt.type or self-reference)

Details

The velocity branch was tightened in 5d49f5d..e836036 (stmt.type === "assignment" plus a no-self-reference check), but the position/rotation info branch treats any = as an incremental change.

Steps to reproduce

func _process(delta):
    position = get_global_mouse_position()
    rotation = 0.0

gdcorrect lint reports two INFO delta-misuse findings.

Impact

Noise on very common code, which fails runs that use --fail-on info.

Suggested fix

Only flag augmented_assignment (+=, -=), or = where the right-hand side references the target itself (position = position + v).

Acceptance criteria

  • The repro reports nothing.
  • position += speed in _process (no delta) still reports.

Getting started

  • Relevant files: src/lint/rules/delta-misuse.ts, test/rules.test.ts
  • How to run tests: npm run build && npm test

Filed by repo-audit/full-audit at e836036. Severity: low. Effort: S. audit-key: bug|src/lint/rules/delta-misuse.ts|deltaMisuse

Lingua principale
TypeScript
Stelle
0
Fork
6
Merge medio
1g 21h
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TMHSDigital/godot-correctness-mcp

Tutte le issue di TMHSDigital/godot-correctness-mcp

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.