| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
crap4java is a standalone CRAP metric tool for Java projects, modeled after crap4clj.
It combines method cyclomatic complexity with JaCoCo method coverage and reports CRAP scores. On each run it deletes stale coverage artifacts, runs coverage, then analyzes the selected files.
CRAP = CC^2 * (1 - coverage)^3 + CC
For each invocation:
mvn testBuild the jar:
mvn -DskipTests packageFrom the project root you want to analyze:
java -jar target/crap4java-0.1.0-SNAPSHOT.jar--help Print usage to stdout
(no args) Analyze all Java files under src/
--changed Analyze changed Java files under src/
<file ...> Analyze only these files
<directory ...> Analyze all Java files under each directory's src/ subtree
Examples:
java -jar target/crap4java-0.1.0-SNAPSHOT.jar --help
java -jar target/crap4java-0.1.0-SNAPSHOT.jar
java -jar target/crap4java-0.1.0-SNAPSHOT.jar --changed
java -jar target/crap4java-0.1.0-SNAPSHOT.jar src/main/java/demo/Sample.java
java -jar target/crap4java-0.1.0-SNAPSHOT.jar module-a module-b| Back | FazBrowse Home | New Git URL |