<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -36,6 +36,6 @@ Feature: Reek can be controlled using command-line options
 
       Report formatting:
           -a, --[no-]show-all              Show all smells, including those masked by config settings
-          -q, --quiet                      Suppress headings for smell-free source files
+          -q, --[no-]quiet                 Suppress headings for smell-free source files
 
       &quot;&quot;&quot;</diff>
      <filename>features/options.feature</filename>
    </modified>
    <modified>
      <diff>@@ -23,11 +23,12 @@ module Reek
     def execute
       begin
         cmd = @options.parse
-        return cmd.execute
+        status = cmd.execute
       rescue Exception =&gt; error
         $stderr.puts &quot;Error: #{error}&quot;
-        return EXIT_STATUS[:error]
+        status = :error
       end
+      return EXIT_STATUS[status]
     end
   end
 end</diff>
      <filename>lib/reek/adapters/application.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,33 +9,36 @@ module Reek
     def initialize(argv)
       @argv = argv
       @parser = OptionParser.new
-      @quiet = false
+      @report_class = FullReport
       @show_all = false
       @command = nil
       set_options
     end
 
-    def parse
-      @parser.parse!(@argv)
-      @command ||= ReekCommand.new(@argv, @quiet, @show_all)
-    end
-
-    def set_options
-      @parser.banner = &lt;&lt;EOB
-Usage: #{@parser.program_name} [options] [files]
+    def banner
+      progname = @parser.program_name
+      return &lt;&lt;EOB
+Usage: #{progname} [options] [files]
 
 Examples:
 
-#{@parser.program_name} lib/*.rb
-#{@parser.program_name} -q -a lib
-cat my_class.rb | #{@parser.program_name}
+#{progname} lib/*.rb
+#{progname} -q -a lib
+cat my_class.rb | #{progname}
 
 See http://wiki.github.com/kevinrutherford/reek for detailed help.
 
 EOB
+    end
 
-      @parser.separator &quot;Common options:&quot;
+    def parse
+      @parser.parse!(@argv)
+      @command ||= ReekCommand.new(@argv, @report_class, @show_all)
+    end
 
+    def set_options
+      @parser.banner = banner
+      @parser.separator &quot;Common options:&quot;
       @parser.on(&quot;-h&quot;, &quot;--help&quot;, &quot;Show this message&quot;) do
         @command = HelpCommand.new(@parser)
       end
@@ -44,12 +47,11 @@ EOB
       end
 
       @parser.separator &quot;\nReport formatting:&quot;
-
       @parser.on(&quot;-a&quot;, &quot;--[no-]show-all&quot;, &quot;Show all smells, including those masked by config settings&quot;) do |opt|
         @show_all = opt
       end
-      @parser.on(&quot;-q&quot;, &quot;--quiet&quot;, &quot;Suppress headings for smell-free source files&quot;) do
-        @quiet = true
+      @parser.on(&quot;-q&quot;, &quot;--[no-]quiet&quot;, &quot;Suppress headings for smell-free source files&quot;) do |opt|
+        @report_class = opt ? QuietReport : FullReport
       end
     end
   end
@@ -60,7 +62,7 @@ EOB
     end
     def execute
       puts @parser.to_s
-      return EXIT_STATUS[:success]
+      :success
     end
   end
 
@@ -70,7 +72,7 @@ EOB
     end
     def execute
       puts &quot;#{@progname} #{Reek::VERSION}&quot;
-      return EXIT_STATUS[:success]
+      :success
     end
   end
 
@@ -78,21 +80,20 @@ EOB
 
     SMELL_FORMAT = '%m%c %w (%s)'
 
-    def initialize(args, quiet, show_all)
-      @args = args
-      @quiet = quiet
+    def initialize(sources, report_class, show_all)
+      @sniffer = sources.length &gt; 0 ? sources.sniff : sniff_stdin
+      @report_class = report_class
       @show_all = show_all
     end
 
+    def sniff_stdin
+      Reek::Sniffer.new($stdin.to_reek_source('$stdin'))
+    end
+
     def execute
-      sniffer = @args.length &gt; 0 ?
-        @args.sniff :
-        Reek::Sniffer.new($stdin.to_reek_source('$stdin'))
-      rpt = @quiet ?
-        QuietReport.new(sniffer.sniffers, SMELL_FORMAT, @show_all) :
-        FullReport.new(sniffer.sniffers, SMELL_FORMAT, @show_all)
+      rpt = @report_class.new(@sniffer.sniffers, SMELL_FORMAT, @show_all)
       puts rpt.report
-      return EXIT_STATUS[sniffer.smelly? ? :smells : :success]
+      return @sniffer.smelly? ? :smells : :success
     end
   end
 end</diff>
      <filename>lib/reek/adapters/command_line.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c6f956bc8e2444045c29c754d65bdd32a361f5ae</id>
    </parent>
  </parents>
  <author>
    <name>Kevin Rutherford</name>
    <email>kevin@rutherford-software.com</email>
  </author>
  <url>http://github.com/kevinrutherford/reek/commit/87c5d1e11dee396332750d12ebac755f012428b4</url>
  <id>87c5d1e11dee396332750d12ebac755f012428b4</id>
  <committed-date>2009-11-07T14:04:25-08:00</committed-date>
  <authored-date>2009-11-07T14:04:25-08:00</authored-date>
  <message>Removed a control couple and some duplication</message>
  <tree>3c60e171423a8babbab417d5011fc1bcdc32a7c5</tree>
  <committer>
    <name>Kevin Rutherford</name>
    <email>kevin@rutherford-software.com</email>
  </committer>
</commit>
