metric calculator for Java projects
for a project:
for each method:
sbt "run -s src"
-t
(or --trend
) flag tracks all previous commits and generate trend.txt
and trend.html
which show how the cn metric changes.Each line represents sloc - dloc - cc - name
of a method.
11 8.5 3 method1
8 7 2 method2
...
This project points to two submodules as samples: GitHub's android app, Google's iosched app.
git submodule init/update
to retrieve sample projects' source
samples/google-iosched
requires 'android-18', 'Google Repository' and 'Build Tool v18.0.1'. To build ./gradlew asDe
samples/github-android
requires 'android-16'. To build mvn package
samples
directory, run scala run_samples.scala
to run metr
on all samples. samples/github-android-output
contains trend
of cn
and sloc
sbt update
will retrieve managed dependencies.sbt eclipse
will generate/update eclipse project setting.sbt assembly
to make a one jar executable