Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Command-line accomodates large quantities of files a little better. E…

….g., if you use this on app/models/*.rb and you have more than 80 models in your Rails app for some insane reason, this gives you readable output, with a blank line separating each file's report, and the name of the file before each report.
  • Loading branch information...
commit f72e5592b423c0abd63870435dd185129723cd4c 1 parent 233d5c0
Giles authored

Showing 1 changed file with 9 additions and 3 deletions. Show diff stats Hide diff stats

  1. +9 3 bin/reek
12 bin/reek
@@ -3,8 +3,14 @@
3 3 # Created on 2008-2-17.
4 4 # Copyright (c) 2008 Kevin Rutherford, Rutherford Software Ltd. All rights reserved.
5 5
6   -require 'reek'
7   -require 'reek/options'
  6 +require File.join(File.dirname(__FILE__), '../lib/', 'reek')
  7 +require File.join(File.dirname(__FILE__), '../lib/', 'reek/options')
8 8
9 9 files = Reek::Options.parse(ARGV)
10   -puts Reek.analyse(*files).to_s
  10 +files.each do |file|
  11 + stinky = Reek.analyse(file).to_s
  12 + next if stinky.empty?
  13 + puts file unless 1 == files.size
  14 + puts stinky
  15 + puts
  16 +end

0 comments on commit f72e559

Please sign in to comment.
Something went wrong with that request. Please try again.