Reek 3 has been released!

My beloved Reek gem has come quite a long way. During the last months we refactored so much of the source code that it almost feels like a new and shiny gem.

Right after the release of Reek 2 we started to work on Reek 3 which we released a couple of days ago.

 A stable API

The changes that I’m most exited about is that we agreed on a public API and implemented it as well. For this API to use you’ll basically just do something like this:

require 'reek'

reporter =
examiner ="class Klazz; def m(a,b,c); end; end")
reporter.add_examiner examiner

which would give you this

5 warnings:
Klazz has no descriptive comment (IrresponsibleModule)
Klazz#m has the name 'm' (UncommunicativeMethodName)
Klazz#m has unused parameter 'a' (UnusedParameters)
Klazz#m has unused parameter 'b' (UnusedParameters)
Klazz#m has unused parameter 'c' (UnusedParameters)

Getting a stable API out is something that hopefully means a lot for projects who make use of Reek programmatically like Rubycritic.

The API is still rather small so you can quickly read up on everything you need to know in 5 minutes here.

 Excludable directories

We made directories excludable via configuration, a feature that was requested quite some times.

The way this works is that you just add a paragraph like this

  - app/views
  - app/controllers

to your Reek config and that’s it - Reek will ignore those directories when scanning.

 Singleton methods

We fixed one of the most annoying bugs that has been around for years. Until now, Reek would not recognise singleton methods if they were defined with the class << self syntax, meaning that this:

class C
  class << self
    def m(a)

would incorrectly report UtilityFunction.
Now it will correctly recognise those methods as singleton methods.


We dropped support Ruby 1.9. Time to move on.

What’s next?


Now read this

Reek 2 just got released!

A couple of days ago we released the new and extremely shiny Reek version 2 to the world! Reek is a static code analyzer for Ruby detecting so called code smells. Those code smells range from rather trivial ones like... Continue →