Skip to content

Commit

Permalink
Removed hard development depencency on flay
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrutherford committed Mar 10, 2009
1 parent 09de77b commit 1c7b723
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions spec/reek/smells/feature_envy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
check 'should not report use of self',
'def simple() self.to_s + self.to_i end', []
check 'should not report vcall with no argument',
'def simple() func + grunc end', []
'def simple() func; end', []
check 'should not report vcall with argument',
'def simple(arga) func(17) + grunc(arga) end', []
'def simple(arga) func(17); end', []
end

describe FeatureEnvy, 'when the receiver is a parameter' do
Expand Down
18 changes: 11 additions & 7 deletions tasks/reek.rake
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
require 'reek/rake_task'
require 'flay'

Reek::RakeTask.new do |t|
t.fail_on_error = true
t.verbose = false
# t.reek_opts = '-f "Smell: %s: %c %w"'
end

desc 'Check for code duplication'
task 'flay' do
files = FileList['lib/**/*.rb']
flayer = Flay.new(16)
flayer.process(*files)
flayer.report
begin
require 'flay'

desc 'Check for code duplication'
task 'flay' do
files = FileList['lib/**/*.rb']
flayer = Flay.new(16)
flayer.process(*files)
flayer.report
end
rescue LoadError
end

0 comments on commit 1c7b723

Please sign in to comment.