Fuck-U-Code: A Brutally Honest Code Quality Analyzer

8月24日 Published inDeveloper Tools

Memorize this command: fuck-u-code — because your code shouldn’t be a source of suffering.

This tool roots out the absolute worst parts of your project. It delivers the cold, hard truth about your work with a heavy dose of sarcasm. Yes, it will actually tell you exactly how much your code sucks.

Privacy is built-in: the analyzer runs entirely on your local machine. No internet connection required, no risk of leaks. Your source code stays under your control.

Languages supported Go, JavaScript/TypeScript, Python, Java, C/C++, Rust, and more.

The "Shit-Mountain" Score A 0–100 quality metric where a higher number represents a bigger pile of garbage. High scorers can claim "bragging rights" for having the most chaotic code on the leaderboard.

Seven quality checks The tool analyzes cyclomatic complexity, function length, comment coverage, error handling, naming conventions, code duplication, and overall structural integrity.

Vibrant terminal reports Make code reviews less of a chore. The colorful output is designed to be engaging—your teammates might even crack a smile while you critique their work.

Markdown output Generate structured reports that are ready-made for AI prompts or project documentation.

Flexible options Includes verbose reporting, summary-only modes, custom report generation, and multi-language support.

Install fuck-u-code

1. Direct installation

go install github.com/Done-0/fuck-u-code/cmd/fuck-u-code@latest

2. Build from source

git clone https://github.com/Done-0/fuck-u-code.git
cd fuck-u-code
go build -o fuck-u-code ./cmd/fuck-u-code

3. Using Docker

docker build -t fuck-u-code .

Usage

Basic analysis

# Analyze a specific directory
fuck-u-code analyze /path/to/your/project

# Shortcut syntax
fuck-u-code /path/to/your/project

# Run with Docker (mounting your local project)
docker run --rm -v "/path/to/your/project:/build" fuck-u-code analyze

# No path specified? It analyzes the current directory
fuck-u-code analyze

Command line options

Option Short Description
--verbose -v Display a detailed analysis report
--top N -t N Show the top N files with the most issues (default: 5)
--issues N -i N Limit issues displayed per file to N (default: 5)
--summary -s Display a summary only, skipping the file-by-file walkthrough
--markdown -m Export the report in Markdown format for AI tools
--lang -l Set output language (zh-CN, en-US)
--exclude -e Skip specific files or directories (can be used multiple times)
--skipindex -x Ignore index.js and index.ts files

Real-world examples

# Get a verbose report
fuck-u-code analyze --verbose

# See the 3 worst-offending files
fuck-u-code analyze --top 3

# Force English output
fuck-u-code analyze --lang en-US

# View just the summary
fuck-u-code analyze --summary

# Ignore test and legacy directories
fuck-u-code analyze --exclude "**/test/**" --exclude "**/legacy/**"

# Print Markdown to the console
fuck-u-code analyze --markdown

# Save Markdown report to a file
fuck-u-code analyze --markdown > report.md

# Generate a detailed English report in Markdown
fuck-u-code analyze --markdown --lang en-US > english-report.md

Advanced usage

Markdown output scenarios

Use the --markdown flag to generate structured data. This is particularly useful for:

  • AI Tools: Feed the output to ChatGPT or Claude to get specific refactoring suggestions.
  • Documentation: Paste the report directly into your project wiki or README.
  • CI/CD Pipelines: Automatically generate quality audits during build steps.
  • Team Reviews: Share a clean, readable summary with colleagues for audits.

Examples:

# Standard markdown output
fuck-u-code analyze --markdown

# Export to file
fuck-u-code analyze --markdown > code-quality-report.md

# Comprehensive English report for the top 10 worst files
fuck-u-code analyze --markdown --top 10 --lang en-US > detailed-report.md

# Export only the high-level summary to Markdown
fuck-u-code analyze --markdown --summary > summary.md

The Markdown report includes:

  • 📊 Overall Assessment: Quality score, letter grade, and file statistics.
  • 📋 Quality Metrics Table: Breakdown of scores and status for every metric.
  • 🔍 Problem File List: Ranked by severity.
  • 💡 Improvement Suggestions: Tasks prioritized by their potential impact.

Troubleshooting

On Linux or macOS, you might encounter a command not found or Unknown command error after installation.

This usually happens because the Go binary directory isn't included in your system's PATH.

How to fix it:

  1. Temporary fix: Run export PATH="$PATH:$(go env GOPATH)/bin" in your current session and try again.
  2. Permanent fix: Add that same line to your configuration file (e.g., .bash_profile, .zshrc, or fish.config). Restart your terminal, and the command will work globally from then on.