There seems to be so many code analysis tools supporting the java language, but I am so far unable to find one that supports scala (something simple like finding LOC would be nice)? I'm working in intellij so have tried metricsReloaded and Static plugins, but they are completely ignoring the scala files.
Any suggestions would be appreciated.. :)
Edit: Metrics needed is just something like lines of code, lines of comment (% of comments), simple stuff like that
Edit: Thanks everyone, both answers were useful. :) I had to just choose an arbitrary "correct" answer (just gave it to the one with least votes up.
I use
cloc
and it works just fine. It understands pretty much any language or script out there, it's easy to install - comes as a package on Linux, and easy to use. It can also output to multiple formats likecsv, xml, yaml, sql, etc
. Here is an example output of one of my projects:Although the examples are in Java, you really need to take a look at the aptly-named Metrics library by Coda Hale. And here is the Scala API for it. I think it will be exactly what you need. It even supports things like partial functions and Actors and Futures.
After seeing @Randall's comment and your edit, it is clear you are looking for static analysis tools rather than what I consider "metrics." My bad. To that end, I suggest you take a look at Scalastyle, which is much better than Gangnam Style and is analogous to CheckStyle in Java. You should also look at cpd4sbt (analogous to PMD) and FindBugs (analogous to, well, FindBugs) despite the commonly reported false positives.