removed-api-usage: fromVersion-only config now fails every lint (exit 2)
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
Línea de trabajo
Lee la lógica de validación en src/lint/rules/removed-api-usage.ts:98-116 y los casos relacionados en test/removed-api.test.ts. Ejecuta la reproducción reportada y luego añade una prueba para un destino inferido combinado con un fromVersion explícito. El objetivo se cumple cuando el caso ya no aborta el lint con el código de salida 2 y satisface uno de los criterios de aceptación indicados; ejecuta npm run build && npm test.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Since removed-api-usage infers targetVersion from project.godot (#91), a config that sets only options.fromVersion makes every lint run fail with exit 2, when the inferred target equals that fromVersion. The error message names targetVersion, an option the user never set.
Where
src/lint/rules/removed-api-usage.ts:98-116
Details
const target = ctx.options["targetVersion"] ?? pinnedVersionFor(ctx.projectGodotVersion ?? null);
...
const fromOpt = ctx.options["fromVersion"];
if (fromOpt !== undefined) {
const others = PINNED_GODOT_VERSIONS.filter((v) => v !== target);
if (typeof fromOpt !== "string" || !(others as readonly string[]).includes(fromOpt)) {
throw new Error(`removed-api-usage: options.fromVersion must be one of ... when targetVersion is ${target} ...`);
Before #91 the rule was simply off without targetVersion, so {"fromVersion": "4.4"} was harmless. Now a project that declares 4.4 infers target = "4.4", and others is ["4.5"]. fromVersion: "4.4" is rejected and the rule throws, which aborts the run.
Impact
Existing configs that pre-set fromVersion (for example, to prepare for an upgrade) break CI with exit 2 after upgrading gdcorrect. The same happens if a project's declared version later changes to match fromVersion.
Steps to reproduce
- Set
project.godotconfig/features=PackedStringArray("4.4", ...). - Use the config
{"rules": {"removed-api-usage": {"options": {"fromVersion": "4.4"}}}}. - Run
gdcorrect lint <project>: exit 2 with the message above.
Suggested fix
When targetVersion was inferred, not configured, and equals fromVersion, skip the rule (nothing to compare) instead of throwing. Otherwise mention the inference in the message, for example "targetVersion 4.4 (inferred from project.godot)".
Acceptance criteria
- The repro returns no
removed-api-usagefindings and exit 0, or a clear message that names the inferred version. - A test covers an inferred target combined with an explicit
fromVersion.
Getting started
- Relevant files:
src/lint/rules/removed-api-usage.ts,test/removed-api.test.ts - How to run tests:
npm run build && npm test
Related: #91
Filed by repo-audit/full-audit at e836036. Severity: medium. Effort: S. audit-key: bug|src/lint/rules/removed-api-usage.ts|fromVersion
- Lenguaje dominante
- TypeScript
- Estrellas
- 0
- Forks
- 6
- Merge medio
- 1 d 21 h
- PR fusionados (30 d)
- 8
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TMHSDigital/godot-correctness-mcp
-
enhancement good first issue severity: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
TMHSDigital/godot-correctness-mcp#123 ·
Los mantenedores suelen responder en 2 días
-
dependencies good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
TMHSDigital/godot-correctness-mcp#116 ·
Los mantenedores suelen responder en 2 días
-
bug good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
TMHSDigital/godot-correctness-mcp#107 ·
Los mantenedores suelen responder en 2 días
-
bug good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
TMHSDigital/godot-correctness-mcp#106 ·
Los mantenedores suelen responder en 2 días
-
bug good first issue severity: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
TMHSDigital/godot-correctness-mcp#105 ·
Los mantenedores suelen responder en 2 días
Todos los issues de TMHSDigital/godot-correctness-mcp
Issues similares
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
openclaw/openclaw#203385 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
nwverse/persona#12800 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
microsoft/playwright#44289 ·
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 2/5 Medio día Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día