Skip to content

Commit

Permalink
Report no longer used as a Collecting Parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrutherford committed Jun 15, 2009
1 parent 742dcb9 commit 57176ba
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/reek/class_context.rb
Expand Up @@ -17,7 +17,7 @@ def ClassContext.create(outer, exp)

def ClassContext.from_s(src)
source = Source.from_s(src)
CodeParser.new(nil, {}).process_class(source.generate_syntax_tree)
CodeParser.new({}).process_class(source.generate_syntax_tree)
end

def initialize(outer, name, superclass = nil)
Expand Down
3 changes: 1 addition & 2 deletions lib/reek/code_parser.rb
Expand Up @@ -29,8 +29,7 @@ class CodeParser

# Creates a new Ruby code checker. Any smells discovered
# will be stored in +report+.
def initialize(report, smells, ctx = StopContext.new)
@report = nil
def initialize(smells, ctx = StopContext.new)
@smells = smells
@element = ctx
end
Expand Down
2 changes: 1 addition & 1 deletion lib/reek/source.rb
Expand Up @@ -77,7 +77,7 @@ def generate_syntax_tree
def report
unless @report
detectors = @cf.smell_listeners
parser = CodeParser.new(nil, detectors)
parser = CodeParser.new(detectors)
parser.process(generate_syntax_tree)
@report = Report.new(detectors)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/reek/smells/long_method_spec.rb
Expand Up @@ -9,7 +9,7 @@

def process_method(src)
source = Source.from_s(src)
CodeParser.new(nil, {}).process_defn(source.generate_syntax_tree)
CodeParser.new({}).process_defn(source.generate_syntax_tree)
end

describe LongMethod do
Expand Down

0 comments on commit 57176ba

Please sign in to comment.