The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Release of Roodi 1.3.0

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Marty Andrews

Posts: 190
Nickname: wry
Registered: Dec, 2003

Marty Andrews is an agile coach and developer for Thoughtworks Australia
Release of Roodi 1.3.0 Posted: Sep 19, 2008 7:14 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by Marty Andrews.
Original Post: Release of Roodi 1.3.0
Feed Title: Ramblings of the Wry Tradesman
Feed URL: http://www.wrytradesman.com/blog/index.rdf
Feed Description: Marty Andrews talks about the day to day issues he faces as an agile coach on large enterprise applications in Australia.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by Marty Andrews
Latest Posts From Ramblings of the Wry Tradesman

Advertisement

I've just released version 1.3.0 of Roodi. It contains two new checks - a CaseMissingElse checks that ensures you have a default path through your case statements, and an AssignmentInConditional check that looks out for things like if foo = 1 which are likely to be mis-typed equality checks. I've also DRY'ed up the code a bit, but the major new feature is the ability to provide your own configuration file.

If a config file is not provided, Roodi now configures itself with via a YAML one that ships inside the gem which looks like this:

AssignmentInConditionalCheck:    { }
CaseMissingElseCheck:            { }
ClassLineCountCheck:             { line_count: 300 }
ClassNameCheck:                  { pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/ }
CyclomaticComplexityBlockCheck:  { complexity: 4 }
CyclomaticComplexityMethodCheck: { complexity: 8 }
EmptyRescueBodyCheck:            { }
ForLoopCheck:                    { }
MethodLineCountCheck:            { line_count: 20 }
MethodNameCheck:                 { pattern: !ruby/regexp /^[_a-z<>=\[\]|+-\/\*`]+[_a-z0-9_<>=~@\[\]]*[=!\?]?$/ }
ModuleLineCountCheck:            { line_count: 300 }
ModuleNameCheck:                 { pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/ }
ParameterNumberCheck:            { parameter_count: 5 }

It's basically a list of checks, each with a hash of options for that check. You can take this file as a starting point and remove existing check, add your own custom new checks, or change the default values on some of them. I've intentionally been strict on the values on some of the checks with thresholds, setting high standards that I'd expect to see on my own projects. If you're working through a long list of warnings and want to eliminate some of the noise, or if you decide the thresholds should be different, you can save this in your own config file and use it to configure roodi.

To use your own config file with roodi, pass it in as a value to the -config parameter on the command line like this:

roodi -config=my_roodi_config.yml "rails_app/**/*.rb"

Read: Release of Roodi 1.3.0

Topic: How to irritate a label Previous Topic   Next Topic Topic: Philly Airport: Free WiFi

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use