package main import "path/filepath" func init() { register(Check{ Seq: 200, ID: "20", Title: "Tailwind v4 configuration (PostCSS, CSS directives, @config)", Run: func(ctx *ScanContext, rep *Reporter) { if len(ctx.frontendTargets) > 0 { var twViolations []tailwindViolation for _, target := range ctx.frontendTargets { if target.pluginRules { continue // Plugin frontends don't have their own PostCSS/Tailwind setup } for _, v := range checkTailwindV4(target.dir) { v.file = filepath.Clean(prefixDisplayPath(target.label, v.file)) twViolations = append(twViolations, v) } } if len(twViolations) > 0 { rep.Fail("%d Tailwind v4 configuration issue(s)", len(twViolations)) for _, v := range twViolations { if v.line > 0 { rep.Findingf("%s:%d [%s] %s", v.file, v.line, v.rule, v.snippet) } else { rep.Findingf("%s [%s] %s", v.file, v.rule, v.snippet) } } } else { rep.OK("Tailwind v4 configuration is correct") } } else { rep.Skip("no frontend sources found") } }, }) }