This page summarizes the rule families used by the analyzer. The exact rule list evolves over time, but the categories below are stable.
- Naming quality: terrible names, abbreviations, single-letter variables
- Structure quality: deep nesting, long functions, god functions
- Maintainability: duplication, commented-out code, stale TODO comments
- Debug leftovers: println and similar print-based debugging
- Language-specific hygiene: Go, Python, Rust, Java, C, C++, Ruby, Swift, and Zig rules
magic-numberdeep-nestinglong-functiongod-functionprintln-debuggingcommented-codetodo-commentduplication
- Rust, Go, Python, JavaScript, TypeScript, Java, C, C++, Ruby, Swift, and Zig are supported
- Tree-sitter grammars are available for the full supported set used by source parsing
- File discovery recognizes the corresponding extensions listed in
src/language/mod.rs
- Use
.garbage-code-hunter.tomlto whitelist accepted names and numbers - Use
exclude-patternsfor generated code - Use
directoriesto reduce sensitivity in noisy folders - Use CLI
--excludefor one-off skips
- Rule names and severities are designed to be humorous rather than authoritative
- The tool does not claim to detect bugs, security issues, or performance regressions