feat(infra): auto-commit con 88 cambios
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,8 @@ func cmdDoctor(args []string) {
|
||||
doctorDod(r, jsonOut)
|
||||
case "e2e-coverage":
|
||||
doctorE2ECoverage(r, jsonOut)
|
||||
case "projects":
|
||||
doctorProjects(r, jsonOut)
|
||||
default:
|
||||
fmt.Fprintf(os.Stderr, "unknown doctor subcommand: %s\n", sub)
|
||||
doctorUsage()
|
||||
@@ -100,6 +102,7 @@ Subcommands:
|
||||
modules Drift entre uses_modules (app.md) y fn_module_<x> link calls (CMakeLists.txt) - issue 0097
|
||||
dod Audita bloque dod_evidence_schema en dev/issues/ y dev/flows/ (issue 0114)
|
||||
e2e-coverage Porcentaje de apps con e2e_checks declarado en su app.md (issue 0121b)
|
||||
projects Cobertura de projects vs sub-repos Gitea (repo propio + hijos clonables) (issue 0171)
|
||||
|
||||
Flags:
|
||||
--json Salida JSON (para scripting/agentes)
|
||||
@@ -505,6 +508,29 @@ func doctorML(root string, jsonOut bool) {
|
||||
fmt.Printf("\nOverall ML environment: %s\n", overall)
|
||||
}
|
||||
|
||||
func doctorProjects(root string, jsonOut bool) {
|
||||
rows, err := infra.AuditProjectsCoverage(root)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
orphans, oerr := infra.FindOrphanProjectRefs(root)
|
||||
if oerr != nil {
|
||||
fmt.Fprintf(os.Stderr, "error: %v\n", oerr)
|
||||
os.Exit(1)
|
||||
}
|
||||
if jsonOut {
|
||||
emit(map[string]any{
|
||||
"coverage": rows,
|
||||
"orphan_project_ids": orphans,
|
||||
})
|
||||
return
|
||||
}
|
||||
fmt.Print(infra.FormatProjectsCoverage(rows))
|
||||
fmt.Println("\n--- Check inverso: project_id huérfanos (apps/analysis sin project declarado) ---")
|
||||
fmt.Print(infra.FormatOrphanProjectRefs(orphans))
|
||||
}
|
||||
|
||||
func emit(v any) {
|
||||
b, err := json.MarshalIndent(v, "", " ")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user