Logo: Relish

  1. Sign in

Project: Reek

Correctly formatted reports

  • @reports

In order to get the most out of reek
As a developer
I want to be able to parse reek's output simply and consistently

Scenarios
two reports run together with indented smells
When
I run reek args
Then
the exit status indicates smells
And
it reports:
spec/samples/two_smelly_files/dirty_one.rb -- 6 warnings:
  Dirty has the variable name '@s' (UncommunicativeName)
  Dirty#a calls @s.title twice (Duplication)
  Dirty#a calls puts(@s.title) twice (Duplication)
  Dirty#a contains iterators nested 2 deep (NestedIterators)
  Dirty#a has the name 'a' (UncommunicativeName)
  Dirty#a has the variable name 'x' (UncommunicativeName)
spec/samples/two_smelly_files/dirty_two.rb -- 6 warnings:
  Dirty has the variable name '@s' (UncommunicativeName)
  Dirty#a calls @s.title twice (Duplication)
  Dirty#a calls puts(@s.title) twice (Duplication)
  Dirty#a contains iterators nested 2 deep (NestedIterators)
  Dirty#a has the name 'a' (UncommunicativeName)
  Dirty#a has the variable name 'x' (UncommunicativeName)
Examples:
args
spec/samples/two_smelly_files/*.rb
spec/samples/two_smelly_files
good files show headers consecutively
When
I run reek args
Then
it succeeds
And
it reports:
spec/samples/three_clean_files/clean_one.rb -- 0 warnings
spec/samples/three_clean_files/clean_three.rb -- 0 warnings
spec/samples/three_clean_files/clean_two.rb -- 0 warnings
Examples:
args
spec/samples/three_clean_files/*.rb
spec/samples/three_clean_files
--quiet turns off headers for fragrant files
When
I run reek option spec/samples/three_clean_files/*.rb
Then
it succeeds
And
stdout equals ""
Examples:
option
-q
--quiet

Last published about 7 years ago by kevinrutherford.