github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

kevinrutherford / reek

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 210
    • 8
  • Source
  • Commits
  • Network (8)
  • Issues (29)
  • Downloads (39)
  • Wiki (31)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • gh-pages
    • master ✓
  • Tags (39)
    • v1.2.7.1
    • v1.2.7
    • v1.2.6
    • v1.2.5
    • v1.2.4
    • v1.2.3
    • v1.2.2
    • v1.2.1
    • v1.2.0
    • v1.1.3.16
    • v1.1.3.15
    • v1.1.3.14
    • v1.1.3.13
    • v1.1.3.12
    • v1.1.3.11
    • v1.1.3.10
    • v1.1.3.9
    • v1.1.3.8
    • v1.1.3.7
    • v1.1.3.6
    • v1.1.3.5
    • v1.1.3.4
    • v1.1.3.3
    • v1.1.3.2
    • v1.1.3.1
    • v1.1.3
    • v1.1.2.1
    • v1.1.2
    • v1.1.1
    • v1.1.0.1
    • v1.1.0
    • v1.0.1
    • v1.0.0
    • v0.3.1.6
    • v0.3.1.5
    • v0.3.1.4
    • v0.3.1.3
    • v0.3.1.2
    • v0.3.0
Sending Request…
Click here to lend your support to: reek and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Code smell detector for Ruby — Read more

  cancel

http://wiki.github.com/kevinrutherford/reek

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Collected self-reference counting in one place 
kevinrutherford (author)
Tue Feb 09 02:03:26 -0800 2010
commit  c1781bb764640d196165eee70cd0605214ce2958
tree    d19fce836959540cb841e850bd8c4371c4a4f1ad
parent  678d2301c97512269be10b296877c9fad5ef5de0
reek /
name age
history
message
file .gitignore Fri Jan 29 12:30:39 -0800 2010 Reduced the visible API reported by yardoc [kevinrutherford]
file .yardopts Fri Jan 29 12:30:39 -0800 2010 Reduced the visible API reported by yardoc [kevinrutherford]
file History.txt Sun Feb 07 13:04:22 -0800 2010 Added capital letters to reject lists for some ... [kevinrutherford]
file License.txt Thu Jul 09 12:53:06 -0700 2009 Added missing licence file [kevinrutherford]
file Manifest.txt Tue Feb 09 02:03:26 -0800 2010 Collected self-reference counting in one place [kevinrutherford]
file README.md Fri Jan 29 12:30:39 -0800 2010 Reduced the visible API reported by yardoc [kevinrutherford]
file Rakefile Mon Oct 12 06:47:36 -0700 2009 First feature for RakeTask [kevinrutherford]
directory bin/ Fri Jan 29 13:13:26 -0800 2010 Removed cli.rb [kevinrutherford]
directory config/ Sun Feb 07 13:04:22 -0800 2010 Added capital letters to reject lists for some ... [kevinrutherford]
directory features/ Sun Feb 07 13:04:22 -0800 2010 Added capital letters to reject lists for some ... [kevinrutherford]
directory lib/ Tue Feb 09 02:03:26 -0800 2010 Collected self-reference counting in one place [kevinrutherford]
directory quality/ Fri Jan 29 04:06:42 -0800 2010 Updated quality matcher syntax [Ashley Moran]
file reek.gemspec Wed Feb 03 03:01:44 -0800 2010 Release 1.2.7.1 [kevinrutherford]
directory spec/ Tue Feb 09 02:03:26 -0800 2010 Collected self-reference counting in one place [kevinrutherford]
directory tasks/ Mon Feb 01 03:28:28 -0800 2010 Release 1.2.7 [kevinrutherford]
README.md

Reek -- code smell detection for Ruby

Reek is a tool that examines Ruby classes, modules and methods and reports any code smells it finds. Install it like this:

$ gem install reek

and run it like this:

$ reek [options] [dir_or_source_file]*

For a full list of command-line options see the Reek wiki[http://wiki.github.com/kevinrutherford/reek/command-line-options] or run

$ reek --help

Example

Imagine a source file csv_writer.rb containing:

class CsvWriter
  def write_line(fields)
    if (fields.length == 0)
      puts
    else
      write_field(fields[0])
      1.upto(fields.length-1) do |i|
        print ","
        write_field(fields[i])
      end
      puts
    end
  end

  #...
end

Reek will report the following code smells in this file:

$ reek csv_writer.rb
CsvWriter#write_line calls fields.length multiple times (Duplication)
CsvWriter#write_line has approx 6 statements (Long Method)
CsvWriter#write_line/block has the variable name 'i' (Uncommunicative Name)

Features

Reek currently includes checks for some aspects of the following smells:

  • Control Couple
  • Data Clump
  • Feature Envy
  • Large Class
  • Long Method
  • Long Parameter List
  • Simulated Polymorphism
  • Uncommunicative Name

...and more. See the Reek wiki for up to date details of exactly what Reek will check in your code.

Tool Integration

Reek integrates with many of your favourite tools:

  • Use Reek::Rake::Task to easily add Reek to your Rakefile
  • Use Reek::Spec to add the should_not reek custom matcher to your Rspec examples
  • Reek is fully compliant with Ruby 1.8.6, 1.8.7 and 1.9.1

Dependencies

Reek makes use of the following other gems:

  • ruby_parser
  • sexp_processor
  • ruby2ruby

Learn More

Find out more about Reek from any of the following sources:

  • Browse the Reek documentation at http://wiki.github.com/kevinrutherford/reek
  • Browse the code or install the latest cutting-edge beta version from http://github.com/kevinrutherford/reek/tree
  • Read the code API at http://rdoc.info/projects/kevinrutherford/reek
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server