ROODI(1)
π NAME π
roodi β Roodi stands for Ruby Object Oriented Design Inferometer. Yes bestie, that's the whole name, it's a mouthful, we love her anyway. This is the roodi(1) page, straight out of the General Commands Manual. π¦
πΈ SYNOPSIS πΈ
roodi [options] [pattern ...]
β¨ DESCRIPTION β¨
Okay so picture this: Roodi stands for Ruby Object Oriented Design Inferometer (iconic acronym energy fr fr). What she does is literally parse your Ruby code and then gently drag you about the design issues you've got going on β all based on the checks she's been configured with. She's not being mean, she's being helpful, and honestly she's right. π
π OPTIONS π
-config=config-fileβ hand her your own config file, your rules your world. The config file is a YAML file that lists the checks to be included. Each check can optionally include a hash of options that get passed to the check to configure it. For example, the default config file 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 }
π¦ EXAMPLE USAGE π¦
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]
π SEE ALSO π
π FILES π
/etc/roodi.ymlβ Roodi default config-file. The blueprint, the moment, the source of truth.
π AUTHOR π
Marty Andrews <marty@cogent.co>
β VERSION β
Roodi, version 2.2.0
And that's the whole page bestie, no notes. π Signing off from the General Commands Manual as roodi(1), brought to you by Roodi, version 2.2.0 β go parse something and let her tell you the truth. π«Άπ
π¦ where this page comes from
- debian bookworm: roodi 5.0.0-5 Β· MIT
- debian trixie: roodi 5.0.0-6 Β· MIT
- ubuntu jammy: roodi 5.0.0-4 Β· MIT
- ubuntu noble: roodi 5.0.0-6 Β· MIT
- ubuntu questing: roodi 5.0.0-6
- ubuntu resolute: roodi 5.0.0-6build1 Β· MIT
- ubuntu stonking: roodi 5.0.0-6build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms