From: "Hubert Łępicki" Date: 2010-08-24T20:50:06+09:00 Subject: Re: Static code analysis in Ruby 1.9 On 24 Sie, 11:30, Hubert Łępicki wrote: > On 24 Sie, 03:16, Ryan Davis wrote: > > > On Aug 23, 2010, at 14:59 , Suraj Kurapati wrote: > > > > Hubert Lepicki wrote: > > >> I am wondering if there is any way to perform sort of static code > > >> analysis for Ruby 1.9 based programs. > > > > See the Ripper standard library which comes with Ruby 1.9: > > >http://www.artweb-design.de/2009/7/5/using-ruby-1-9-ripper > > > Unfortunately that doesn't really help him much. He's still left hanging with actually analyzing the code. > > > I've got a code contribution that will convert ripper output into unified ParseTree-compatibile output, but I haven't gotten around to integrating it. I think I'm probably going to use it to sanity check my parser as I add 1.9 compatibility to it. > > Well, that's a good link, thank you for that. I think for now I'll > write sort of very simple ABC calculating routine myself. Have looked > at Flog source code and it should be much better to use that, however > I don't have much time to spend on that now (need to see the results > fast). > > Ryan, if you need a hand with integrating your Ripple to ruby_parser > format ASTs with your tools I'm happy to help. Ok, I have commited this crime in the meantime: http://github.com/hubertlepicki/metric_abc gives me good enough inteligence where should I look for bad code. Certainly needs some more work but it's usable with some pain.