
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
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 it has configured.
Open your terminal and type this:
$ gem install roodi
Alternatively, you can put it in your Gemfile:
gem "roodi"
To check one or more files using the default configuration that comes with Roodi, use:
$ roodi [-config=file] [pattern ...]
Check all ruby files recursively under the current directory:
$ roodi
or $ roodi .
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]
Add the following to your Rakefile:
require 'roodi_task'
task :default => [:roodi]
or if you want to supply your own config file...
require 'roodi_task'
RoodiTask.new :config => 'config/roodi.yml'
task :default => [:roodi]
You can run Roodi in Atom using the linter-roodi package.
To change the set of checks included, or to change the default values of the checks, you can 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]*$/
ClassVariableCheck:
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
Please use the GitHub issue tracker.
Fantastic! Please follow this procedure:
$ gem build roodi.gemspec
$ gem push roodi-X.X.X.gem
(The MIT License)
Copyright (c) 2015 Marty Andrews, Peter Evjan
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Unknown package
We found that roodi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.