auditor: el motivo del waiver también necesita el sitio
Los 18 waivers del ES salían como "waived: None": la línea que imprime el motivo llamaba a accepted_reason sin el sitio, así que lo buscaba en el diccionario del EN. El waiver se aplicaba bien —eso sí pasaba el sitio—, pero el informe salía mudo justo donde tiene que justificarse, que es el único propósito de esa sección. Y si algún día vuelve a no haber motivo, ahora lo dice: un waiver sin razón documentada es un fallo, no un hueco que rellenar con None.
This commit is contained in:
+5
-2
@@ -204,10 +204,13 @@ def main():
|
||||
print("ACCEPTED EXCEPTIONS (won't fix — documented decisions, NOT in the count)\n")
|
||||
for p, actionable, accepted, info, sc in sorted(results, key=lambda t: t[0]["slug"]):
|
||||
for v in accepted:
|
||||
reason = X.accepted_reason(v.rule, p["slug"])
|
||||
# ⚠️ CON el sitio: sin él busca en el diccionario del EN y
|
||||
# devuelve None para los 18 waivers del ES, dejando el informe
|
||||
# mudo justo donde tiene que justificarse.
|
||||
reason = X.accepted_reason(v.rule, p["slug"], args.site)
|
||||
print(f"• {p['slug']}")
|
||||
print(f" [{R.SEV_NAME[v.severity]:4}] {v.message}")
|
||||
print(f" waived: {reason}")
|
||||
print(f" waived: {reason or '⚠ SIN MOTIVO DOCUMENTADO — esto es un fallo'}")
|
||||
print()
|
||||
|
||||
# ---- ranked guidance ----
|
||||
|
||||
Reference in New Issue
Block a user