package main import "fmt" func init() { register(Check{ Seq: 90, ID: "9", Title: "No npm/yarn lockfiles (pnpm only)", Run: func(ctx *ScanContext, rep *Reporter) { // Check 9: No npm/yarn lockfiles fmt.Println("=== Check 9: No npm/yarn lockfiles (pnpm only) ===") lockViolations := []lockfileViolation{} if ctx.includeCoreTargets { lockViolations = checkLockfiles(ctx.repoRoot) } for _, target := range ctx.pluginTargets { for _, v := range checkLockfiles(target.root) { v.file = prefixDisplayPath(target.display, v.file) lockViolations = append(lockViolations, v) } } if len(lockViolations) > 0 { fmt.Printf(" FAIL: %d non-pnpm lockfile(s) found:\n", len(lockViolations)) for _, v := range lockViolations { fmt.Printf(" %s\n", v.file) } fmt.Println("\n Fix: Remove and use pnpm (pnpm-lock.yaml only)") rep.Fail() } else { fmt.Println(" OK: Only pnpm lockfiles present") printPerTargetOKLines(pluginTargetLabels(ctx.pluginTargets)) } fmt.Println() }, }) }