package main func init() { register(Check{ Seq: 90, ID: "9", Title: "No npm/yarn lockfiles (pnpm only)", Run: func(ctx *ScanContext, rep *Reporter) { 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 { rep.Fail("%d non-pnpm lockfile(s) found — remove and use pnpm (pnpm-lock.yaml only)", len(lockViolations)) for _, v := range lockViolations { rep.Findingf("%s", v.file) } } else { rep.OK("Only pnpm lockfiles present") } }, }) }