-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Context
Go currently has only 2 language-specific patterns (placeholder_panic_go, empty_catch_js partially). For a language this common in the AI tooling ecosystem, coverage is far too thin.
Patterns to add
Debugging
fmt.Println/fmt.Printfdebugging statements (not in test files)log.Println/log.Printfleft from debugging (context-dependent)spew.Dump/pp.Printlndebug pretty-printers
Placeholders
// TODO: implementwith empty function body- Functions returning only zero values with a TODO comment
Error handling
if err != nil { }- empty error check blocks_ = someFunc()- explicitly discarded errors (outside known-safe cases)
Code smells
interface{}/anyoveruse in function signatures (heuristic)- Bare
os.Exit()outside main
Implementation
- Add patterns to
slop-patterns.jswithlanguage: 'go' - Add
.gomulti-pass support inslop-analyzers.js(COMMENT_SYNTAX, EXPORT_PATTERNS already exist) - Add
golangci-lintintegration in Phase 2 (cli-enhancers.js- scaffold exists but needs patterns)
Acceptance
- 8+ Go-specific patterns
- Tests for each pattern (true positive + false positive cases)
npm testpasses
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels