reek 5.0.2 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +9 -70
  3. data/.rubocop_todo.yml +63 -0
  4. data/.simplecov +4 -1
  5. data/CHANGELOG.md +5 -0
  6. data/Gemfile +12 -17
  7. data/README.md +21 -29
  8. data/Rakefile +2 -2
  9. data/docs/templates/default/docstring/setup.rb +3 -0
  10. data/features/command_line_interface/options.feature +5 -3
  11. data/features/configuration_files/schema_validation.feature +3 -3
  12. data/features/configuration_files/show_configuration_file.feature +44 -0
  13. data/features/rake_task/rake_task.feature +1 -1
  14. data/features/reports/json.feature +3 -3
  15. data/features/reports/reports.feature +4 -4
  16. data/features/reports/yaml.feature +3 -3
  17. data/features/rspec_matcher.feature +1 -0
  18. data/features/step_definitions/sample_file_steps.rb +6 -8
  19. data/features/todo_list.feature +39 -26
  20. data/lib/reek.rb +7 -0
  21. data/lib/reek/ast/node.rb +4 -0
  22. data/lib/reek/ast/sexp_extensions/if.rb +20 -0
  23. data/lib/reek/ast/sexp_extensions/methods.rb +1 -0
  24. data/lib/reek/cli/application.rb +25 -0
  25. data/lib/reek/cli/command/todo_list_command.rb +17 -7
  26. data/lib/reek/cli/options.rb +21 -14
  27. data/lib/reek/code_comment.rb +2 -0
  28. data/lib/reek/configuration/app_configuration.rb +0 -3
  29. data/lib/reek/configuration/configuration_converter.rb +4 -4
  30. data/lib/reek/configuration/directory_directives.rb +1 -0
  31. data/lib/reek/configuration/schema_validator.rb +1 -0
  32. data/lib/reek/context/method_context.rb +1 -0
  33. data/lib/reek/context/module_context.rb +5 -4
  34. data/lib/reek/context/visibility_tracker.rb +7 -4
  35. data/lib/reek/context_builder.rb +1 -0
  36. data/lib/reek/detector_repository.rb +1 -0
  37. data/lib/reek/errors/incomprehensible_source_error.rb +2 -2
  38. data/lib/reek/errors/syntax_error.rb +4 -0
  39. data/lib/reek/examiner.rb +1 -0
  40. data/lib/reek/report/text_report.rb +1 -0
  41. data/lib/reek/smell_detectors/control_parameter.rb +13 -107
  42. data/lib/reek/smell_detectors/control_parameter_helpers/call_in_condition_finder.rb +91 -0
  43. data/lib/reek/smell_detectors/control_parameter_helpers/candidate.rb +38 -0
  44. data/lib/reek/smell_detectors/control_parameter_helpers/control_parameter_finder.rb +94 -0
  45. data/lib/reek/smell_detectors/duplicate_method_call.rb +1 -0
  46. data/lib/reek/smell_detectors/feature_envy.rb +2 -0
  47. data/lib/reek/smell_detectors/irresponsible_module.rb +1 -0
  48. data/lib/reek/smell_detectors/long_parameter_list.rb +1 -0
  49. data/lib/reek/smell_detectors/manual_dispatch.rb +1 -0
  50. data/lib/reek/smell_detectors/missing_safe_method.rb +1 -0
  51. data/lib/reek/smell_detectors/nested_iterators.rb +1 -0
  52. data/lib/reek/smell_detectors/repeated_conditional.rb +1 -0
  53. data/lib/reek/smell_detectors/too_many_instance_variables.rb +1 -0
  54. data/lib/reek/smell_detectors/too_many_methods.rb +1 -0
  55. data/lib/reek/smell_detectors/too_many_statements.rb +1 -0
  56. data/lib/reek/smell_detectors/uncommunicative_variable_name.rb +2 -0
  57. data/lib/reek/smell_detectors/unused_parameters.rb +1 -0
  58. data/lib/reek/source/source_locator.rb +1 -0
  59. data/lib/reek/spec/should_reek_of.rb +2 -2
  60. data/lib/reek/spec/should_reek_only_of.rb +1 -0
  61. data/lib/reek/spec/smell_matcher.rb +1 -0
  62. data/lib/reek/tree_dresser.rb +1 -0
  63. data/lib/reek/version.rb +1 -1
  64. data/samples/smelly_source/ruby.rb +368 -0
  65. data/spec/factories/factories.rb +10 -9
  66. data/spec/performance/reek/smell_detectors/runtime_speed_spec.rb +17 -0
  67. data/spec/quality/documentation_spec.rb +40 -0
  68. data/spec/reek/ast/sexp_extensions_spec.rb +20 -20
  69. data/spec/reek/cli/application_spec.rb +29 -0
  70. data/spec/reek/cli/command/todo_list_command_spec.rb +64 -46
  71. data/spec/reek/configuration/app_configuration_spec.rb +8 -8
  72. data/spec/reek/configuration/configuration_file_finder_spec.rb +3 -3
  73. data/spec/reek/configuration/schema_validator_spec.rb +10 -10
  74. data/spec/reek/detector_repository_spec.rb +2 -2
  75. data/spec/reek/smell_detectors/control_parameter_spec.rb +17 -0
  76. data/spec/reek/source/source_locator_spec.rb +0 -2
  77. data/spec/spec_helper.rb +2 -0
  78. data/tasks/configuration.rake +2 -1
  79. data/tasks/test.rake +4 -0
  80. metadata +11 -5
  81. data/ataru_setup.rb +0 -13
  82. data/tasks/ataru.rake +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4bcb2aafdd323d869bc486bfde721dfa290d8faa
4
- data.tar.gz: 1a63a1bbaadcd3ae873a85f8560024124aeddf5b
3
+ metadata.gz: 3e1bd0b5a333788b75250144a86c3a1a47a915bb
4
+ data.tar.gz: b9077da5e1add357ca2411a983cccaef9f754ab5
5
5
  SHA512:
6
- metadata.gz: b812c771f685ac34d1c6c240ca259b467cb9a19db49264aef1340118e74f62053113313ebcf644177d37600a70d205f2215378b9f7bb3a8f51d137b20e5d534c
7
- data.tar.gz: 80769603222b66562779e6690d35931eae51504eadd3fda1fce2764dcd9f9d54f2b6b26cce9a5503ba07e13239df75b4a5cecae936768fafad294d1699bbadf7
6
+ metadata.gz: b7c6ea853eabe8c9d2b090bd12c679bf5a95723b9009d48b35e641c106126697e3ad53ed4121b7540ee5d9bf8fe6e95c269bb90f7b16cfb25ea049953f9b2e26
7
+ data.tar.gz: 2b2cc32734fa88f97792cae488fae2e210981920b53626b3041f3e88846e856cf54e8ad26e8d430992cbb4f3b0fdc6be0f4653cc51dc2528655efda4b2cd7db2
@@ -1,3 +1,5 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
1
3
  require:
2
4
  - rubocop-rspec
3
5
 
@@ -45,37 +47,11 @@ Lint/InterpolationCheck:
45
47
  Lint/BooleanSymbol:
46
48
  Enabled: false
47
49
 
48
- Lint/HandleExceptions:
49
- Exclude:
50
- - 'spec/reek/configuration/configuration_file_finder_spec.rb'
51
-
52
50
  # Spec blocks can be any size
53
51
  Metrics/BlockLength:
54
52
  Exclude:
55
53
  - 'spec/**/*'
56
54
 
57
- # FIXME: Make the class shorter
58
- Metrics/ClassLength:
59
- Exclude:
60
- - lib/reek/context_builder.rb
61
- - lib/reek/cli/options.rb
62
-
63
- Style/SafeNavigation:
64
- Exclude:
65
- - lib/reek/ast/node.rb
66
- - lib/reek/ast/sexp_extensions/module.rb
67
-
68
- # FIXME: Lower the method length by fixing the biggest offenders
69
- Metrics/MethodLength:
70
- Max: 15
71
- Exclude:
72
- - 'lib/reek/cli/options.rb'
73
-
74
- Metrics/AbcSize:
75
- Exclude:
76
- - 'lib/reek/cli/options.rb'
77
- - 'lib/reek/configuration/configuration_converter.rb'
78
-
79
55
  # Be rather lenient with line length
80
56
  Metrics/LineLength:
81
57
  Max: 120
@@ -84,56 +60,21 @@ Metrics/LineLength:
84
60
  Metrics/ParameterLists:
85
61
  CountKeywordArgs: false
86
62
 
87
- Naming/AccessorMethodName:
88
- Exclude:
89
- - 'lib/reek/context/visibility_tracker.rb'
90
-
91
63
  # EOS is a fine name to use in our specs
92
64
  Naming/HeredocDelimiterNaming:
93
65
  Exclude:
94
66
  - 'spec/**/*'
95
67
 
96
- # FIXME: Update specs to avoid offenses
97
- RSpec/AnyInstance:
98
- Exclude:
99
- - 'spec/reek/cli/application_spec.rb'
100
-
101
- # This file does not test a class
68
+ # These files do not test classes or modules
102
69
  RSpec/DescribeClass:
103
70
  Exclude:
104
- - 'spec/quality/reek_source_spec.rb'
71
+ - 'spec/quality/*_spec.rb'
72
+ - 'spec/performance/reek/smell_detectors/runtime_speed_spec.rb'
105
73
 
106
74
  # Our examples are large because we have source literals in them
107
75
  RSpec/ExampleLength:
108
76
  Enabled: false
109
77
 
110
- # FIXME: Split up files to avoid offenses
111
- RSpec/MultipleDescribes:
112
- Exclude:
113
- - 'spec/reek/ast/sexp_extensions_spec.rb'
114
- - 'spec/reek/code_comment_spec.rb'
115
- - 'spec/reek/report/location_formatter_spec.rb'
116
- - 'spec/reek/report/progress_formatter_spec.rb'
117
-
118
- # FIXME: Update specs to avoid offenses
119
- RSpec/MultipleExpectations:
120
- Exclude:
121
- - 'spec/reek/cli/application_spec.rb'
122
- - 'spec/reek/code_comment_spec.rb'
123
- - 'spec/reek/configuration/app_configuration_spec.rb'
124
- - 'spec/reek/context/module_context_spec.rb'
125
- - 'spec/reek/context_builder_spec.rb'
126
- - 'spec/reek/examiner_spec.rb'
127
- - 'spec/reek/spec/should_reek_of_spec.rb'
128
-
129
- # FIXME: Update specs to avoid offenses
130
- RSpec/NestedGroups:
131
- Exclude:
132
- - 'spec/reek/report/code_climate/code_climate_fingerprint_spec.rb'
133
- - 'spec/reek/cli/application_spec.rb'
134
- - 'spec/reek/configuration/schema_validator_spec.rb'
135
- - 'spec/reek/configuration/configuration_file_finder_spec.rb'
136
-
137
78
  # rubocop-rspec expects a CodeClimate namespace to go with the code_climate directory.
138
79
  RSpec/FilePath:
139
80
  Exclude:
@@ -146,12 +87,6 @@ RSpec/FilePath:
146
87
  Style/AndOr:
147
88
  EnforcedStyle: conditionals
148
89
 
149
- Style/Documentation:
150
- Exclude:
151
- - 'lib/reek/ast/sexp_extensions/send.rb'
152
- - 'lib/reek/ast/sexp_extensions/super.rb'
153
- - 'lib/reek/ast/sexp_extensions/variables.rb'
154
-
155
90
  # Require comment for files in lib and bin
156
91
  Style/FrozenStringLiteralComment:
157
92
  Include:
@@ -190,3 +125,7 @@ Style/SymbolArray:
190
125
  # Allow small arrays of words with quotes
191
126
  Style/WordArray:
192
127
  MinSize: 4
128
+
129
+ Metrics/ClassLength:
130
+ Exclude:
131
+ - 'lib/reek/cli/options.rb'
@@ -0,0 +1,63 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2018-08-17 12:44:20 +0200 using RuboCop version 0.58.2.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 3
10
+ Metrics/AbcSize:
11
+ Max: 21
12
+
13
+ # Offense count: 2
14
+ # Configuration parameters: CountComments.
15
+ Metrics/ClassLength:
16
+ Max: 178
17
+
18
+ # Offense count: 12
19
+ # Configuration parameters: CountComments.
20
+ Metrics/MethodLength:
21
+ Max: 16
22
+
23
+ # Offense count: 2
24
+ RSpec/AnyInstance:
25
+ Exclude:
26
+ - 'spec/reek/cli/application_spec.rb'
27
+
28
+ # Offense count: 1
29
+ # Configuration parameters: CustomIncludeMethods.
30
+ RSpec/EmptyExampleGroup:
31
+ Exclude:
32
+ - 'spec/factories/factories.rb'
33
+
34
+ # Offense count: 1
35
+ RSpec/MissingExampleGroupArgument:
36
+ Exclude:
37
+ - 'spec/factories/factories.rb'
38
+
39
+ # Offense count: 4
40
+ RSpec/MultipleDescribes:
41
+ Exclude:
42
+ - 'spec/reek/ast/sexp_extensions_spec.rb'
43
+ - 'spec/reek/code_comment_spec.rb'
44
+ - 'spec/reek/report/location_formatter_spec.rb'
45
+ - 'spec/reek/report/progress_formatter_spec.rb'
46
+
47
+ # Offense count: 32
48
+ # Configuration parameters: AggregateFailuresByDefault.
49
+ RSpec/MultipleExpectations:
50
+ Max: 5
51
+
52
+ # Offense count: 23
53
+ RSpec/NestedGroups:
54
+ Max: 5
55
+
56
+ # Offense count: 2
57
+ # Cop supports --auto-correct.
58
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
59
+ # Whitelist: present?, blank?, presence, try, try!
60
+ Style/SafeNavigation:
61
+ Exclude:
62
+ - 'lib/reek/ast/node.rb'
63
+ - 'lib/reek/ast/sexp_extensions/module.rb'
data/.simplecov CHANGED
@@ -2,10 +2,13 @@ SimpleCov.start do
2
2
  track_files 'lib/**/*.rb'
3
3
  add_filter 'lib/reek/version.rb' # version.rb is loaded too early to test
4
4
  add_filter 'lib/reek/cli/options.rb' # tested mostly via integration tests
5
+ add_filter 'spec/'
6
+ add_filter 'samples/'
7
+ coverage_dir 'tmp/coverage'
5
8
  end
6
9
 
7
10
  SimpleCov.at_exit do
8
11
  SimpleCov.result.format!
9
- SimpleCov.minimum_coverage 98.9
12
+ SimpleCov.minimum_coverage 98.88
10
13
  SimpleCov.minimum_coverage_by_file 81.4
11
14
  end
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 5.1.0 (2018-09-22)
6
+
7
+ * (troessner) Simplify todo list feature.
8
+ * (troessner) Show configuration path.
9
+
5
10
  ## 5.0.2 (2018-07-10)
6
11
 
7
12
  * (mvz) Parser 2.5.1.1 seems broken. Disallow it.
data/Gemfile CHANGED
@@ -5,20 +5,18 @@ gemspec
5
5
  ruby RUBY_VERSION
6
6
 
7
7
  group :development do
8
- gem 'activesupport', '>= 4.2'
9
- gem 'aruba', '~> 0.14.0'
10
- gem 'ataru', '~> 0.2.0'
11
- gem 'cucumber', '~> 3.0'
12
- gem 'factory_bot', '~> 4.0'
13
- gem 'rake', '~> 12.0'
14
- gem 'rspec', '~> 3.0'
15
- gem 'simplecov', '~> 0.16.1'
16
- gem 'yard', '~> 0.9.5'
17
-
18
- if RUBY_VERSION >= '2.3'
19
- gem 'rubocop', '~> 0.57.1'
20
- gem 'rubocop-rspec', '~> 1.20'
21
- end
8
+ gem 'activesupport', '>= 4.2'
9
+ gem 'aruba', '~> 0.14.0'
10
+ gem 'cucumber', '~> 3.0'
11
+ gem 'factory_bot', '~> 4.0'
12
+ gem 'kramdown', '~> 1.17'
13
+ gem 'rake', '~> 12.0'
14
+ gem 'rspec', '~> 3.0'
15
+ gem 'rspec-benchmark', '~> 0.3.0'
16
+ gem 'rubocop', '~> 0.59.1'
17
+ gem 'rubocop-rspec', '~> 1.29.0'
18
+ gem 'simplecov', '~> 0.16.1'
19
+ gem 'yard', '~> 0.9.5'
22
20
 
23
21
  platforms :mri do
24
22
  gem 'redcarpet', '~> 3.4.0'
@@ -26,11 +24,8 @@ group :development do
26
24
  end
27
25
 
28
26
  group :debugging do
29
- # Fixing https://github.com/guard/guard/wiki/Add-Readline-support-to-Ruby-on-Mac-OS-X#option-4-using-a-pure-ruby-readline-implementation
30
27
  gem 'pry'
31
- gem 'rb-readline', '~> 0.5.3'
32
28
  platforms :mri do
33
29
  gem 'pry-byebug'
34
- gem 'pry-stack_explorer'
35
30
  end
36
31
  end
data/README.md CHANGED
@@ -407,6 +407,16 @@ end
407
407
 
408
408
  This is an incredibly powerful feature and further explained under [Smell Suppresion](docs/Smell-Suppression.md).
409
409
 
410
+ #### Debugging trouble with the configuration
411
+
412
+ With Reeks dynamic mechanism of finding a configuration file you might run into a situation where you are not
413
+ 100% sure what configuration file Reek is using. E.g. you have a project specific configuration file in your
414
+ project root and also another Reek configuration in your HOME directory that you use for all your other projects
415
+ and for whatever reasons Reek seems to be using another configuration file than the one you assumed it would.
416
+
417
+ In this case you can pass the flag `--show-configuration-path` to Reek which will cause Reek to output the path
418
+ to the configuration file it is using.
419
+
410
420
  ### Generating a 'todo' list
411
421
 
412
422
  Integrating tools like Reek into an existing larger codebase can be daunting when you have to fix
@@ -420,29 +430,28 @@ suppress all smell warnings for the current codebase:
420
430
  reek --todo lib/
421
431
  ```
422
432
 
423
- This will create the file '.todo.reek' in your current working directory.
433
+ This will create the file '.reek.yml' in your current working directory.
424
434
 
425
435
  You can then use this as your configuration - since your working directory
426
436
  probably is your project root in most cases you don't have to tell Reek
427
- explicitly to use '.todo.reek' because Reek will automatically pick it up
437
+ explicitly to use '.reek.yml' because Reek will automatically pick it up
428
438
  and use it as configuration file. See [Configuration Loading](#configuration-loading) above.
429
439
 
430
- If for whatever reasons you decide to put '.todo.reek' somewhere else where
440
+ If for whatever reasons you decide to put '.reek.yml' somewhere else where
431
441
  Reek won't pick it up automatically you need to tell Reek explicitly to do so
432
442
  via:
433
443
 
434
444
  ```Bash
435
- reek -c whatever/.todo.reek lib/
445
+ reek -c whatever/.reek.yml lib/
436
446
  ```
437
447
 
438
448
  It's important to understand that the number one use case of the `--todo` flag
439
449
  is to be run once at the beginning of the introduction of Reek to ease the transition.
440
- If you find yourself re-running Reek with the `--todo` flag in order to silence new warnings
450
+ If you find yourself wanting to re-run Reek with the `--todo` flag in order to silence a lot of new warnings
441
451
  you're defeating the purpose of both the `--todo` flag and of Reek itself.
442
452
 
443
- As a consequence, running Reek with the `--todo` flag again will overwrite '.todo.reek' without
444
- asking (should not be a problem since this file is supposed to be versioned) and
445
- without taking **any** other configuration file you might have into account.
453
+ As a consequence, running Reek with the `--todo` flag again will not overwrite an existing '.reek.yml'
454
+ and instead abort execution. It also will not take **any** other configuration file you might have into account.
446
455
 
447
456
  This means that when you run
448
457
 
@@ -450,8 +459,10 @@ This means that when you run
450
459
  reek -c other_configuration.reek --todo lib/
451
460
  ```
452
461
 
453
- `other_configuration.reek` will simply be ignored (as outlined before, Reek
454
- is supposed to have one configuration file and one file only).
462
+ `other_configuration.reek` will simply be ignored.
463
+
464
+ Of course you can always just delete the existing .reek.yml file and then run Reek with the `--todo` flag
465
+ but keep in mind that this is not the intended use case of this feature.
455
466
 
456
467
  ## Usage
457
468
 
@@ -492,16 +503,6 @@ bundle exec rake
492
503
 
493
504
  This will run the tests (RSpec and Cucumber), RuboCop and Reek itself.
494
505
 
495
- You can also run:
496
-
497
- ```
498
- bundle exec rake ci
499
- ```
500
-
501
- This will run everything the default task runs and also
502
- [Ataru](https://github.com/CodePadawans/ataru). This is the task that we run on
503
- Travis as well and that determines if your pull request is green or red.
504
-
505
506
  Another useful Rake task is the `console` task. This will throw you right into an environment where you can play around with Reeks modules and classes:
506
507
 
507
508
  ```
@@ -521,15 +522,6 @@ require 'pry'
521
522
  binding.pry
522
523
  ```
523
524
 
524
- If you do this, you need to also run the specs with `DEBUG=1` set, e.g.:
525
-
526
- ```
527
- DEBUG=1 bundle exec rspec spec/your/file_spec.rb:23
528
- ```
529
-
530
- This is necessary because normally all specs run with a timeout of 5 seconds,
531
- which isn't much if you're busy using Pry.
532
-
533
525
  Have a look at our [Developer API](docs/API.md) for more inspiration.
534
526
 
535
527
  From then on you should check out:
data/Rakefile CHANGED
@@ -6,11 +6,11 @@ Dir['tasks/**/*.rake'].each { |t| load t }
6
6
  task :ci do
7
7
  [
8
8
  'test:spec',
9
+ 'test:performance',
9
10
  'configuration:update_default_configuration',
10
11
  'test:features',
11
12
  :rubocop,
12
- 'test:quality',
13
- :ataru
13
+ 'test:quality'
14
14
  ].each do |name|
15
15
  puts "\n=== Running #{name}...\n"
16
16
  Rake::Task[name].invoke
@@ -1,6 +1,7 @@
1
1
  def init
2
2
  super
3
3
  return unless show_api_marker_section?
4
+
4
5
  if sections.first
5
6
  sections.first.place(:api_marker).before(:private)
6
7
  else
@@ -10,6 +11,7 @@ end
10
11
 
11
12
  def api_marker
12
13
  return if object.type == :root
14
+
13
15
  erb(:private) unless ['public', 'private'].include? api_text
14
16
  end
15
17
 
@@ -23,6 +25,7 @@ end
23
25
 
24
26
  def show_api_marker_section?
25
27
  return false if object.type == :root
28
+
26
29
  case api_text
27
30
  when 'public'
28
31
  false
@@ -20,7 +20,7 @@ Feature: Reek can be controlled using command-line options
20
20
  Then the exit status is 23
21
21
 
22
22
  Scenario: return given status code when using --success-exit-code
23
- Given the clean file 'clean.rb'
23
+ Given the clean file "clean.rb"
24
24
  When I run reek clean.rb --success-exit-code 42
25
25
  Then the exit status is 42
26
26
 
@@ -43,7 +43,7 @@ Feature: Reek can be controlled using command-line options
43
43
  -c, --config FILE Read configuration options from FILE
44
44
  --smell SMELL Only look for a specific smell.
45
45
  Call it like this: reek --smell MissingSafeMethod source.rb
46
- Check out https://github.com/troessner/reek/blob/v5.0.2/docs/Code-Smells.md for a list of smells
46
+ Check out https://github.com/troessner/reek/blob/v5.1.0/docs/Code-Smells.md for a list of smells
47
47
  --stdin-filename FILE When passing code in via pipe, assume this filename when checking file or directory rules in the config.
48
48
 
49
49
  Generate a todo list:
@@ -62,6 +62,8 @@ Feature: Reek can be controlled using command-line options
62
62
  --[no-]color Use colors for the output (default: true)
63
63
  -V, --[no-]empty-headings Show headings for smell-free source files (default: false)
64
64
  -U, --[no-]documentation Show link to related documentation page for each smell (default: true)
65
+ --[no-]show-configuration-path
66
+ Show which configuration file Reek is using (default: false)
65
67
  -n, --[no-]line-numbers Show line numbers in the output (default: true)
66
68
  -s, --single-line Show location in editor-compatible single-line-per-smell format
67
69
  -P, --[no-]progress Show progress of each source as it is examined (default: true)
@@ -118,5 +120,5 @@ Feature: Reek can be controlled using command-line options
118
120
  UnusedPrivateMethod
119
121
  UtilityFunction
120
122
 
121
- Check out https://github.com/troessner/reek/blob/v5.0.2/docs/Code-Smells.md for a details on each detector
123
+ Check out https://github.com/troessner/reek/blob/v5.1.0/docs/Code-Smells.md for a details on each detector
122
124
  """
@@ -5,7 +5,7 @@ Feature: Validate schema
5
5
 
6
6
  Scenario: Our generated default configuration
7
7
  Given our default configuration file
8
- And the clean file 'clean.rb'
8
+ And the clean file "clean.rb"
9
9
  When I run reek -c defaults.reek clean.rb
10
10
  Then it succeeds
11
11
  And it reports nothing
@@ -37,7 +37,7 @@ Feature: Validate schema
37
37
  - lib/legacy
38
38
  - lib/rake/legacy_tasks
39
39
  """
40
- And the clean file 'clean.rb'
40
+ And the clean file "clean.rb"
41
41
  When I run reek -c config.reek clean.rb
42
42
  Then it succeeds
43
43
  And it reports nothing
@@ -50,7 +50,7 @@ Feature: Validate schema
50
50
  DoesNotExist:
51
51
  enabled: true
52
52
  """
53
- And the clean file 'clean.rb'
53
+ And the clean file "clean.rb"
54
54
  When I run reek -c config.reek clean.rb
55
55
  Then the exit status indicates an error
56
56
  And stderr reports: