{"id":13994808,"url":"https://github.com/roodi/roodi","last_synced_at":"2025-07-22T20:31:08.307Z","repository":{"id":424928,"uuid":"44967","full_name":"roodi/roodi","owner":"roodi","description":"Ruby Object Oriented Design Inferometer","archived":false,"fork":false,"pushed_at":"2021-02-11T05:40:50.000Z","size":294,"stargazers_count":279,"open_issues_count":2,"forks_count":37,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-24T18:55:04.940Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roodi.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2008-08-22T12:51:40.000Z","updated_at":"2024-02-08T19:44:25.000Z","dependencies_parsed_at":"2022-07-08T01:50:41.159Z","dependency_job_id":null,"html_url":"https://github.com/roodi/roodi","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roodi%2Froodi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roodi%2Froodi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roodi%2Froodi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roodi%2Froodi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roodi","download_url":"https://codeload.github.com/roodi/roodi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226821009,"owners_count":17687350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-09T14:03:06.920Z","updated_at":"2024-11-29T16:31:57.485Z","avatar_url":"https://github.com/roodi.png","language":"Ruby","readme":"# roodi\n\n[![Build Status](https://travis-ci.com/roodi/roodi.svg?branch=master)](https://travis-ci.com/roodi/roodi)\n[![Coverage Status](https://coveralls.io/repos/roodi/roodi/badge.png?branch=master)](https://coveralls.io/r/roodi/roodi?branch=master)\n\n## Description\n\nRoodi 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.\n\n## Install\n\nOpen your terminal and type this:\n\n`$ gem install roodi`\n\nAlternatively, you can put it in your Gemfile:\n\n`gem \"roodi\"`\n\n## Synopsis\n\nTo check one or more files using the default configuration that comes with Roodi, use:\n\n`$ roodi [-config=file] [pattern ...]`\n\n## Example Usage\n\nCheck all ruby files recursively under the current directory:\n\n`$ roodi` or `$ roodi .`\n\nCheck all ruby files in a rails app:\n\n`$ roodi \"rails_app/**/*.rb\"`\n\nCheck one controller and one model file in a rails app:\n\n`$ roodi app/controller/sample_controller.rb app/models/sample.rb`\n\nCheck one controller and all model files in a rails app:\n\n`$ roodi app/controller/sample_controller.rb \"app/models/*.rb\"`\n\nCheck all ruby files in a rails app with a custom configuration file:\n\n`$ roodi -config=my_roodi_config.yml \"rails_app/**/*.rb\"`\n\nIf 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:\n\n`$ roodi-describe [filename]`\n\n## Running it as part of your build\n\nAdd the following to your Rakefile:\n\n    require 'roodi_task'\n    task :default =\u003e [:roodi]\n\nor if you want to supply your own config file...\n\n    require 'roodi_task'\n    RoodiTask.new :config =\u003e 'config/roodi.yml'\n    task :default =\u003e [:roodi]\n\n## Editor integration\nYou can run Roodi in Atom using the [linter-roodi](https://atom.io/packages/linter-roodi) package.\n\n## Custom Configuration\n\nTo 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:\n\n    AssignmentInConditionalCheck:\n    CaseMissingElseCheck:\n    ClassLineCountCheck:\n      line_count: 300\n    ClassNameCheck:\n      pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/\n    ClassVariableCheck:\n    CyclomaticComplexityBlockCheck:\n      complexity: 4\n    CyclomaticComplexityMethodCheck:\n      complexity: 8\n    EmptyRescueBodyCheck:\n    ForLoopCheck:\n    MethodLineCountCheck:\n      line_count: 20\n    MethodNameCheck:\n      pattern: !ruby/regexp /^[_a-z\u003c\u003e=\\[|+-\\/\\*`]+[_a-z0-9_\u003c\u003e=~@\\[\\]]*[=!\\?]?$/\n    ModuleLineCountCheck:\n      line_count: 300\n    ModuleNameCheck:\n      pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/\n    ParameterNumberCheck:\n      parameter_count: 5\n\n## Supported Checks\n\n* AssignmentInConditionalCheck - Check for an assignment inside a conditional.  It's probably a mistaken equality comparison.\n* CaseMissingElseCheck - Check that case statements have an else statement so that all cases are covered.\n* ClassLineCountCheck - Check that the number of lines in a class is below the threshold.\n* ClassNameCheck - Check that class names match convention.\n* CyclomaticComplexityBlockCheck - Check that the cyclomatic complexity of all blocks is below the threshold.\n* CyclomaticComplexityMethodCheck - Check that the cyclomatic complexity of all methods is below the threshold.\n* EmptyRescueBodyCheck - Check that there are no empty rescue blocks.\n* ForLoopCheck - Check that for loops aren't used (Use Enumerable.each instead)\n* MethodLineCountCheck - Check that the number of lines in a method is below the threshold.\n* MethodNameCheck - Check that method names match convention.\n* ModuleLineCountCheck - Check that the number of lines in a module is below the threshold.\n* ModuleNameCheck - Check that module names match convention.\n* ParameterNumberCheck - Check that the number of parameters on a method is below the threshold.\n\n## Suggested Checks\n\n* BlockVariableShadowCheck - Check that a block variable does not have the same name as a method parameter or local variable.  It may be mistakenly referenced within the block.\n\n## Contributing\n\n### Bug reporting\nPlease use the GitHub issue tracker.\n\n### Want to submit some code?\nFantastic! Please follow this procedure:\n- Fork the repository\n- Create a well-named topic branch\n- Add specs for any changes you make\n- Write meaningful commit messages explaining why this change is needed\n- Create a pull request.\n\n### How to publish a new version (maintainers only)\n1. Bump the version in version.rb\n1. `$ gem build roodi.gemspec`\n1. `$ gem push roodi-X.X.X.gem`\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2015 Marty Andrews, Peter Evjan\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":["Ruby","Programming Languages"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froodi%2Froodi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froodi%2Froodi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froodi%2Froodi/lists"}