check-links accepts --stale-days=N and then ignores it (365 is used)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, node.js
Línea de trabajo
Lee site/check-links.mjs alrededor de las líneas 99–105 y site/lib/link-check.mjs alrededor de las líneas 54–63; luego sigue cómo las opciones analizadas llegan a staleDaysFrom. Ejecuta las pruebas pertinentes para --stale-days=30 y --stale-days 30, además de un valor no válido. La tarea estará terminada cuando ambas formas válidas usen un límite de 30 días y los valores no válidos sigan fallando.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
check-links parses argv twice: the strict cliArgs parse accepts --stale-days=30, then staleDaysFrom(process.argv) scans for the exact token --stale-days, misses the = form and falls back to 365 days without a warning.
Where
site/check-links.mjs:99-105site/lib/link-check.mjs:54-63(staleDaysFrom)
Details
readArgs returns { "stale-days": "30" } while staleDaysFrom(['node','x','--stale-days=30']) returns { days: 365 }. This is the last script that still hand-parses argv after the strict-flags change.
Impact
A maintainer asking for a shorter staleness window locally silently gets the 365-day report. The weekly workflow passes no flag, so CI is unaffected.
Steps to reproduce
node site/check-links.mjs --stale-days=30 --report r.md- The stale list uses a 365-day cutoff.
Suggested fix
Validate the parsed value (flags["stale-days"]) in staleDaysFrom instead of re-reading process.argv, and drop the second parse.
Acceptance criteria
-
--stale-days=30and--stale-days 30both give a 30-day cutoff - Invalid values still fail as they do today
Getting started
- Relevant files:
site/check-links.mjs,site/lib/link-check.mjs - Run the tests:
npm test; the full local gate isnpm run check(Node 22+, no install step) - Related docs:
CONTRIBUTING.md,site/README.md
Related: #82
Filed by repo-audit/full-audit at 4adb944. Severity: low. Effort: S. audit-key: bug|site/check-links.mjs|staleDaysFrom
- Lenguaje dominante
- JavaScript
- Estrellas
- 58
- Forks
- 15
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 12
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una 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/Free-Game-Dev-Assets
-
enhancement good first issue priority: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
TMHSDigital/Free-Game-Dev-Assets#272 ·
Los mantenedores suelen responder en 1 día
-
documentation good first issue priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
TMHSDigital/Free-Game-Dev-Assets#270 ·
Los mantenedores suelen responder en 1 día
-
documentation priority: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
TMHSDigital/Free-Game-Dev-Assets#269 ·
Los mantenedores suelen responder en 1 día
-
good first issue priority: low tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
TMHSDigital/Free-Game-Dev-Assets#267 ·
Los mantenedores suelen responder en 1 día
-
good first issue priority: low tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
TMHSDigital/Free-Game-Dev-Assets#266 ·
Los mantenedores suelen responder en 1 día
Todos los issues de TMHSDigital/Free-Game-Dev-Assets
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/TypeScript#65370 ·
Los mantenedores suelen responder en 1 día
-
metrics priority: medium
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
LearningCircuit/local-deep-research#8336 ·
Los mantenedores suelen responder en 1 día
-
ace bug yaml
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
svelte: whitespace-only edit leaves an empty todo, edits not trimmed, filter not restored on reloadAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
agentic-workflows
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
githubnext/gh-cao#20316 ·
Los mantenedores suelen responder en 1 día