unclebob

unclebob / crap4java

Public

Crap analyzer for my java projects.

18
6
100% credibility
Found Mar 14, 2026 at 17 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Java
AI Summary

crap4java is a standalone tool that analyzes Java projects to compute CRAP scores combining code complexity and test coverage, helping identify methods needing improvement.

How It Works

1
🔍 Discover the checker

You hear about a simple tool called crap4java that spots overly complicated parts of your Java code that aren't well tested.

2
💻 Get the tool ready

Download the project and prepare the checker app so it's ready to use on your computer.

3
📁 Open your project folder

Navigate to the folder containing your Java project that you want to analyze.

4
Pick what to check
📋
Check everything

Scan all Java files in your project's source folder.

🔄
Check changes

Focus just on the files you recently modified.

🎯
Check specifics

Target particular files or entire folders you choose.

5
🚀 Launch the checker

Run the tool and watch it automatically freshen up test results and dive into your code.

6
📊 View the results

Get a neat report listing methods by their CRAP score, from highest to lowest, with complexity and coverage details.

Improve your code

Spot trouble spots easily and get warned if any score is too high, so you can simplify and test better.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 17 to 18 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is crap4java?

crap4java is a standalone CLI analyzer for Java projects that computes CRAP scores—blending cyclomatic complexity with JaCoCo coverage—to flag risky methods. Drop the JAR in your repo root and run it to auto-clean stale coverage, execute Maven tests, parse sources, and output a sorted table of method scores with CC, coverage, and CRAP. Modes include scanning all src files, git-changed Java files via `--changed`, or specific paths, making it a targeted github crap remover for bulk crap in projects.

Why is it gaining traction?

From Uncle Bob, it hooks Java devs with git integration for PR reviews and multi-module support without config hassles, unlike generic linters. The CRAP formula punishes low-coverage complexity hard, delivering instant, threshold-aware reports (exit 2 if >8). It's a lightweight alternative to full IDE plugins or CI suites like SonarQube.

Who should use this?

Java backend maintainers auditing legacy codebases, teams gating PRs on quality metrics, or solo devs spotting crap in changed files before commits. Ideal for Maven projects needing quick crapfixer github scans without bloating pipelines.

Verdict

Grab it for personal Java projects or small teams—Uncle Bob's touch adds trust despite 12 stars and 1.0% credibility score signaling early-stage maturity. Docs are solid, tests pass, but expect tweaks for edge cases; not production-gate ready yet.

(178 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.