Findbugs & al for Scala ?

246 views
Skip to first unread message

Jan Goyvaerts I❤©

unread,
May 22, 2012, 8:03:52 AM5/22/12
to BeScala, scala-user
Scala is being tried here in the full test & release cycle. Which also means the static code analysis. And it seems FB has things to say about Scala's byte code.

Logically I would expect this not to be the case. Being it the same byte code. But on the other hand I guess FB has been written with Java practices and mortal programmers in mind. And presumably the Scala compiler does awkward things that turn out well nonetheless.

Does somebody knows about FB-alike tools for Scala ? And while we're at it, other static code analysis tools like pmd and checkstyle for Java ?

MTIA !

Jan






Michael Froh

unread,
May 22, 2012, 9:02:04 AM5/22/12
to BeScala on behalf of Jan Goyvaerts
Jorge Ortiz started a project called Linter a couple of months ago, running as a Scala compiler plugin. It doesn't do much yet, but it catches a few common mistakes. (The type mismatch checking rules for == and contains have equivalents in FindBugs, if I recall correctly.)

http://github.com/jorgeortiz85/linter

I'm impressed by how short the code to handle those few cases is. (It almost makes writing a compiler plugin look easy!)

Unfortunately, since he announced it a couple of months ago, nothing has been committed on his branch.

HTH,
Michael

Renato Guerra Cavalcanti

unread,
May 22, 2012, 9:11:07 AM5/22/12
to BeScala on behalf of Jan Goyvaerts

Jan Goyvaerts I❤©

unread,
May 22, 2012, 9:21:33 AM5/22/12
to BeScala on behalf of Renato Cavalcanti
That is nice. :-) See if I can cram it into our CI.

Thanks !

Jan Goyvaerts I❤©

unread,
May 22, 2012, 10:47:27 AM5/22/12
to BeScala on behalf of Renato Cavalcanti, scala-user
I'm probably pushing my luck, but... there's no Jenkins plugin for scalastyle by any chance ? :-)

Renato Guerra Cavalcanti

unread,
May 22, 2012, 11:05:52 AM5/22/12
to BeScala on behalf of Jan Goyvaerts
no idea

I wondering if you can generate a report from it.
If so, if should not be hard to code a plugin or convert it to a format that Jenkins can use.

Jan Goyvaerts I❤©

unread,
May 22, 2012, 11:32:24 AM5/22/12
to BeScala on behalf of Renato Cavalcanti
Something on my long todo list... :-)

Jan Goyvaerts I❤©

unread,
May 23, 2012, 3:47:27 AM5/23/12
to Daniel Sobral, BeScala, scala-user
Thank you very much ! :-)

I'm trying to get this visualized in Jenkins. As it is already the case for Java code. Is there something for that already ?

On Tue, May 22, 2012 at 11:46 PM, Daniel Sobral <dcso...@gmail.com> wrote:
Foursquare's Linter (https://github.com/foursquare/linter) and
Scalastyle (https://github.com/scalastyle/scalastyle).
--
Daniel C. Sobral

I travel to the future all the time.

Jan Goyvaerts I❤©

unread,
May 23, 2012, 9:15:08 AM5/23/12
to Daniel Sobral, BeScala, scala-user
Don't tell me there's a Scala CI somewhere ? :-)

On Wed, May 23, 2012 at 3:07 PM, Daniel Sobral <dcso...@gmail.com> wrote:
I haven't heard of anything, but I'm really not strong on Scala+Jenkins.

On Wed, May 23, 2012 at 4:47 AM, Jan Goyvaerts I❤©
Reply all
Reply to author
Forward
0 new messages