style: normalize any check finding lines to canonical file:line format

Drop the stray em-dash (envreads) and arrow (reinvented) separators so all
findings use the two canonical shapes: "file:line snippet" and
"file:line [rule] detail".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Alex Dunmow 2026-07-04 01:30:52 +08:00
parent c4d01de82c
commit 05a0354c85
3 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ func init() {
if len(envViolations) > 0 { if len(envViolations) > 0 {
rep.Fail("%d secret env var read(s) outside config.Load() — secrets must flow through Config → DI", len(envViolations)) rep.Fail("%d secret env var read(s) outside config.Load() — secrets must flow through Config → DI", len(envViolations))
for _, v := range envViolations { for _, v := range envViolations {
rep.Findingf("%s:%d os.Getenv(%q)", v.file, v.line, v.envVar) rep.Findingf("%s:%d os.Getenv(%q)", v.file, v.line, v.envVar)
} }
} else { } else {
if len(ctx.pluginTargets) > 0 { if len(ctx.pluginTargets) > 0 {

View File

@ -30,7 +30,7 @@ func init() {
if len(allReinvented) > 0 { if len(allReinvented) > 0 {
rep.Fail("%d reinvented utility pattern(s)", len(allReinvented)) rep.Fail("%d reinvented utility pattern(s)", len(allReinvented))
for _, v := range allReinvented { for _, v := range allReinvented {
rep.Findingf("%s:%d [%s] %s", v.file, v.line, v.rule, v.hint) rep.Findingf("%s:%d [%s] %s", v.file, v.line, v.rule, v.hint)
} }
} else { } else {
rep.OK("No reinvented utilities detected") rep.OK("No reinvented utilities detected")

View File

@ -1,6 +1,6 @@
check-safety FIXTURE_DIR check-safety FIXTURE_DIR
FAIL 1 1 secret env var read(s) outside config.Load() — secrets must flow through Config → DI FAIL 1 1 secret env var read(s) outside config.Load() — secrets must flow through Config → DI
internal/service/handler.go:17 os.Getenv("JWT_SECRET") internal/service/handler.go:17 os.Getenv("JWT_SECRET")
FAIL 2c 1 CMS backend go.mod violation(s) FAIL 2c 1 CMS backend go.mod violation(s)
FIXTURE_DIR/go.mod [missing-go-mod] missing go.mod FIXTURE_DIR/go.mod [missing-go-mod] missing go.mod
FAIL 14 1 raw SQL statement(s) found outside sqlc/Bob FAIL 14 1 raw SQL statement(s) found outside sqlc/Bob