ROODI(1) | General Commands Manual | ROODI(1) |
roodi - Roodi stands for Ruby Object Oriented Design Inferometer.
roodi [options] [pattern ...]
Roodi stands for Ruby Object Oriented Design Inferometer. It parses your Ruby code and warns you about design issues you have based on the checks that is has configured.
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 }
Check all ruby files in a rails app:
roodi "rails_app/**/*.rb"
Check one controller and one model file in a rails app:
roodi app/controller/sample_controller.rb app/models/sample.rb
Check one controller and all model files in a rails app:
roodi app/controller/sample_controller.rb "app/models/*.rb"
Check all ruby files in a rails app with a custom configuration
file:
roodi -config=my_roodi_config.yml "rails_app/**/*.rb"
If you're writing a check, it is useful to see the structure of a
file the way that Roodi tokenizes it (via ruby_parser). Use:
roodi-describe [filename]
roodi-describe(1)
http://roodi.rubyforge.org
Marty Andrews <marty@cogent.co>
Roodi, version 2.2.0