Garbage Code Hunter
A humorous code quality detector that roasts your garbage code with style!
Inspiration: https://github.com/Done-0/fuck-u-code.git
What is this?
Garbage Code Hunter is a CLI toolkit for code quality analysis. Unlike traditional linters that give you dry warnings, we tell you how bad your code is in a sarcastic witty and brutally honest way.
Tool Collection
| Tool | Command | Alias | What it does |
|---|---|---|---|
| Code Hunter | analyze (default) |
- | Static analysis: naming, nesting, unwrap abuse, duplication |
| Commit Roaster | commit-roaster |
cr |
Roast bad commit messages from git history |
| Deps Shamer | deps-shamer |
ds |
Shame bad dependency practices |
| PR Title Hunter | pr-title-hunter |
pr |
Roast low-quality PR titles |
| Full Scan | scan |
- | Run all tools, get combined score |
| Badge | badge |
- | Generate SVG score badge |
| Trend | trend |
- | Show quality score trend over time |
| Last Words | last-words |
lw |
Find legacy TODO/FIXME/HACK comments and their age |
| Debt Invoice | debt-invoice |
debt |
Generate a technical debt invoice with cost estimates |
| Personality | personality |
- | Analyze your developer personality based on code patterns |
| Decay | decay |
- | Analyze project quality decay over git history |
| Autopsy | autopsy |
- | Generate a code autopsy report (root cause analysis) |
| Radar | radar |
- | Generate a code smell radar chart (SVG) |
| CI Bot | ci-bot |
- | Generate a CI-style PR review comment |
| Persona | persona |
- | Analyze code with a specific roast personality |
| Danger Zone | danger-zone |
dz |
Identify the most dangerous files in the codebase |
| Team Roast | team-roast |
- | Per-developer team analysis and roasting |
Architecture
graph TB
CLI["garbage-code-hunter<br/>CLI Entry (clap)"]
subgraph Core["Core Engine"]
TS["Tree-Sitter Engine<br/>AST Parsing (11 languages)"]
GA["Generic Analyzer<br/>Regex-based fallback"]
AN["CodeAnalyzer<br/>Unified analysis pipeline"]
CTX["Context System<br/>File type detection"]
end
subgraph Rules["Rule Engine (tree-sitter)"]
BR["Base Rules<br/>nesting, naming, length"]
CR_R["Complex Rules<br/>god-function, duplication"]
RR["Rust Rules<br/>unwrap, lifetime, macro"]
REM["Remaining Rules<br/>magic-number, dead-code"]
end
subgraph Tools["18 Analysis Tools"]
CH["Code Hunter<br/>Static Analysis"]
CMR["Commit Roaster<br/>Git History"]
DS["Deps Shamer<br/>5 Ecosystems"]
PR["PR Title Hunter<br/>Local + GitHub"]
end
subgraph FunTools["Fun Tools"]
LW["Last Words"]
DI["Debt Invoice"]
PE["Personality"]
DC["Decay"]
AU["Autopsy"]
RD["Radar SVG"]
CB["CI Bot"]
PA["Persona"]
DZ["Danger Zone"]
TR["Team Roast"]
end
subgraph Output["Output"]
TERM["Terminal<br/>Colored"]
JSON["JSON"]
SVG["SVG<br/>Badge/Radar"]
end
CLI --> AN
AN --> TS
AN --> GA
TS --> BR & CR_R & RR & REM
AN --> CTX
CLI --> CH & CMR & DS & PR
CLI --> FunTools
CH & CMR & DS & PR --> TERM & JSON
RD & BADGE --> SVG
graph LR
subgraph DepsShamer["Deps Shamer - Multi-Ecosystem"]
direction TB
CARGO["Cargo.toml<br/>Rust"]
NPM["package.json<br/>Node.js"]
GOMOD["go.mod<br/>Go"]
PIP["requirements.txt<br/>Python"]
PYPROJ["pyproject.toml<br/>Python"]
end
subgraph Rules["Rule Engine"]
direction TB
TRAIT["DepRule / PrRule / Rule<br/>Trait Interface"]
DEFAULT["default_rules()<br/>Built-in Rules"]
CUSTOM["TOML Config<br/>Custom Rules"]
end
subgraph PRMode["PR Title Hunter Modes"]
direction TB
LOCAL["Local Mode<br/>git2 merge commits"]
REMOTE["Remote Mode<br/>GitHub API"]
end
DepsShamer --> TRAIT
TRAIT --> DEFAULT
TRAIT --> CUSTOM
PRMode --> LOCAL
PRMode --> REMOTE
Features
- 18 tools: Static analysis, git roasting, dependency shaming, PR review, and 11 entertainment tools
- Multi-ecosystem deps: Cargo.toml, package.json, go.mod, requirements.txt, pyproject.toml
- GitHub API: PR Title Hunter supports remote repos (
--repo owner/repo) - Historical trends: Track quality over time with ASCII charts
- SVG badges: Generate shields.io-style badges for READMEs
- Code smell radar: SVG radar chart for README visualization
- Developer personality: Profile your coding style with fun personas
- Technical debt invoice: Estimate the real cost of your code smells
- Code autopsy: Root cause analysis of codebase problems
- Danger zone: Identify the riskiest files by churn, complexity, and contributors
- Team roast: Per-developer analysis with commit habit roasting
- CI comment bot: Generate PR review comments for GitHub Actions
- Multiple personas: Roast as Linux Kernel Maintainer, Silicon Valley CTO, Japanese Enterprise Engineer, or Rust Evangelist
- Context-aware: Adjusts sensitivity for test/example/UI code
- Dual output: Colored terminal or JSON for all commands
- Bilingual: English and Chinese roasts
- LLM powered: Optional Ollama integration for creative roasts
- VSCode extension: Real-time analysis in your editor
- 11 languages: Rust, C, C++, Python, JavaScript, TypeScript, Go, Java, Ruby, Swift, Zig
How to Play
Level 1: Quick Roast (30 seconds)
# Install
# Analyze current project — get roasted immediately
# Chinese mode
Level 2: Full Scan (2 minutes)
# Run ALL 18 tools — get a combined garbage score
# Save to history for trend tracking
# Check your score trend
Level 3: Deep Dive (5 minutes)
# Roast your commit history
# Shame your dependencies
# Find your worst files
# Generate a radar chart
Level 4: Team Battle
# Who's the worst committer?
# What's your developer personality?
# Generate a technical debt invoice
Level 5: CI Integration
# Generate PR review comments
# Generate a score badge for your README
Real Project Reports
Self-Analysis: garbage-code-hunter (this project)
📊 Garbage Scan Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
code-hunter 0/100 (44,836 issues in 93 files)
commit-roaster 57/100 (50 commits analyzed)
deps-shamer 100/100 (29 dependencies — clean!)
pr-title-hunter 100/100 (0 PRs checked)
last-words 64/100 (7,085 TODO/FIXME found)
debt-invoice 0/100 ($89,069 estimated debt)
personality 0/100 (The Copy-Paste Artist)
decay 50/100 (Declining)
autopsy 97/100 (1 root cause found)
radar 58/100 (6 dimensions scored)
danger-zone 52/100 (10 dangerous files)
team-roast 98/100 (2 team members)
Overall Score: 39/100 (Grade: B)
Developer Personality: The Copy-Paste Artist
"Ctrl+C, Ctrl+V is your IDE's most used shortcut. Why abstract when you can duplicate?"
Code Smell Radar:
Complexity 100 ████████████████████
Duplication 100 ████████████████████
Naming 30 ██████
Panic Risk 20 ████
Dep Hell 0
Legacy Smell 100 ████████████████████
Team Stats:
#1 Timwood0x10 53 commits | 36% fix rate | worst: "fix ci"
#2 Marky-Shi 5 commits | 60% fix rate | worst: "fix: Add debugging..."
Top 5 Most Dangerous Files:
1. mod.rs (6,352 issues — i18n roast messages)
2. rust_rules.rs (2,260 issues — tree-sitter rules)
3. complex_rules.rs (2,050 issues — complex patterns)
4. display.rs (1,997 issues — report formatting)
5. duplication.rs (1,804 issues — dup detection)
Example: Rust Project Analysis
)
)
)
)
| |
JSON Output (for CI/CD integration)
|
|
|
Quick Start
Install
Subcommands
Code Analysis (default)
Commit Roaster
Deps Shamer
PR Title Hunter
# Local mode (from merge commits)
# Remote mode (GitHub API)
Full Scan
Badge
Trend
Last Words
Debt Invoice
Personality
Decay
Autopsy
Radar
CI Bot
Persona
Danger Zone
Team Roast
Output Formats
All subcommands support terminal (default, colored) and json output:
|
|
|
Example Output
Commit Roaster
Commit Roast Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Scanned 50 commits, found 12 issues
Critical (2)
* abc1234 "" -- The commit message is empty. Were you sleepwalking?
* def5678 "asdf" -- Keyboard mashing is not a commit strategy.
High (5)
* ghi9012 "fix" -- Fix WHAT? 'fix' is not a description, it's a cry for help.
Score: 76/100 (B)
Trend
Quality Trend
(showing last 5 scans)
Score
85 | ●
| |
80 | --+
|
05-01 05-08 05-13
Breakdown
Overall 75 -> 85 (+10) UP
code-hunter 65 -> 78 (+13) UP
commit-roaster 80 -> 82 (+2) RIGHT
Recent Scans
2026-05-13T10:00:00 85 .
2026-05-08T14:30:00 80 .
2026-05-01T09:00:00 75 .
Full Scan
Running Full Garbage Scan...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
code-hunter: 72/100 (23 issues in 15 files)
commit-roaster: 85/100 (50 commits analyzed)
deps-shamer: 90/100 (45 dependencies)
pr-title-hunter: 95/100 (30 PRs checked)
Garbage Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Tool Summary
code-hunter 72/100 (23 items)
commit-roaster 85/100 (50 items)
deps-shamer 90/100 (45 items)
pr-title-hunter 95/100 (30 items)
Overall Garbage Score: 86/100
Tool Details
Code Hunter Rules (Rust)
- Single-letter variable names
- Meaningless names (data, temp, foo, bar)
- Deep nesting (>4 levels)
- Long functions (>50 lines)
unwrap()abuse- Magic numbers
- Duplicate code blocks
- Cross-file duplication detection
- Context-aware: reduced sensitivity for test/example code
Commit Roaster Rules
- Empty messages, single-word commits
- WIP commits on shared branches
- Generic messages: "fix", "update", "change"
- Keyboard mashing (asdf, qwer)
- ALL CAPS, excessive exclamation marks
- Version bump only, default merge messages
- Configurable via TOML rule files
Deps Shamer Rules
- Too many dependencies (>50)
- Git-based dependencies
- Wildcard or star versions
- Pre-release versions in production
- Deprecated packages (per-ecosystem lists)
- Duplicate dependencies
- Too many dev/optional deps
PR Title Hunter Rules
- Empty or too-short titles (<5 chars)
- Generic titles ("fix", "update", "WIP")
- Ticket-only titles ("PROJ-123", "#456")
- ALL CAPS, excessive exclamation marks
- Keyboard mashing
- Lowercase start (skips conventional commits)
VSCode Extension
Get real-time roasting in VSCode:
- Install the
garbage-code-hunterCLI - Search "Garbage Code Hunter" in VSCode marketplace
- Analysis triggers automatically when you save Rust files
License
Apache License 2.0
Remember: We roast the code, not you. Let's make code reviews a bit more fun!