---
name: "roodi"
section: "1"
platform: "linux"
package: "roodi"
version: "5.0.0-6"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/roodi"
---

# roodi(1)

Roodi stands for Ruby Object Oriented Design Inferometer.

## NAME

roodi - Roodi stands for Ruby Object Oriented Design Inferometer.

## SYNOPSIS

**roodi** \[*options*\] \[*pattern* ...\]

## DESCRIPTION

**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.

## OPTIONS

- **-config=***config-file*

  Provide your own *config-file*. The *config-file* is a YAML file that lists the checks to be included. Each check can optionally include a hash of options that are 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

[**roodi-describe**(1)](/roodi-describe/1.md)\
 *http://roodi.rubyforge.org*

## FILES

- /etc/roodi.yml

  Roodi default *config-file*.

## AUTHOR

Marty Andrews \<marty@cogent.co\>

## VERSION

**Roodi**, version 2.2.0\
