package main import "fmt" // enableBuildmodePluginCheck is the per-check enable toggle. It ships DISABLED // (WO-WZ-009): the wasm plugin migration is still porting the fleet off `.so`, // so a `-buildmode=plugin` target is not yet a hard error. WO-WZ-017 flips this // to true once every plugin repo builds wasm via `ninja plugin build`. // // While disabled the check prints NOTHING and never fails, so it neither // disturbs golden snapshots nor blocks in-flight ports. const enableBuildmodePluginCheck = false func init() { register(Check{ Seq: 290, ID: "29", Title: "No -buildmode=plugin targets in ported plugin repos", Run: func(ctx *ScanContext, rep *Reporter) { if !enableBuildmodePluginCheck { return // disabled until WO-WZ-017; emit no output } fmt.Println("=== Check 29: No -buildmode=plugin targets in ported plugin repos ===") violations := checkBuildmodePlugin(ctx.resolvedPluginTargets) if len(violations) > 0 { fmt.Printf(" FAIL: %d legacy .so build target(s) found:\n", len(violations)) for _, v := range violations { fmt.Printf(" %s:%d %s\n", v.file, v.line, v.snippet) } fmt.Println("\n Fix: build wasm with `ninja plugin build` (make build-wasm); drop the -buildmode=plugin target.") rep.Fail() } else { fmt.Println(" OK: No -buildmode=plugin targets found") printPerTargetOKLines(pluginTargetLabels(ctx.resolvedPluginTargets)) } fmt.Println() }, }) }