reek 5.4.0 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +27 -6
- data/.rubocop_todo.yml +4 -4
- data/.simplecov +1 -0
- data/.travis.yml +13 -11
- data/CHANGELOG.md +27 -1
- data/Dockerfile +2 -1
- data/Gemfile +15 -17
- data/README.md +15 -11
- data/bin/code_climate_reek +12 -2
- data/docs/Attribute.md +1 -1
- data/docs/Control-Couple.md +1 -1
- data/docs/Nil-Check.md +4 -1
- data/features/command_line_interface/options.feature +2 -3
- data/features/reports/codeclimate.feature +2 -2
- data/features/reports/json.feature +3 -3
- data/features/reports/reports.feature +4 -4
- data/features/reports/yaml.feature +3 -3
- data/features/step_definitions/reek_steps.rb +4 -0
- data/features/support/env.rb +1 -2
- data/lib/reek/ast/sexp_extensions/arguments.rb +11 -0
- data/lib/reek/cli/command/todo_list_command.rb +7 -2
- data/lib/reek/cli/options.rb +2 -2
- data/lib/reek/code_comment.rb +45 -38
- data/lib/reek/configuration/configuration_converter.rb +2 -2
- data/lib/reek/configuration/directory_directives.rb +7 -1
- data/lib/reek/errors/legacy_comment_separator_error.rb +36 -0
- data/lib/reek/examiner.rb +3 -3
- data/lib/reek/report.rb +5 -7
- data/lib/reek/report/code_climate/code_climate_report.rb +2 -1
- data/lib/reek/report/simple_warning_formatter.rb +0 -7
- data/lib/reek/report/text_report.rb +2 -2
- data/lib/reek/smell_detectors/base_detector.rb +2 -10
- data/lib/reek/smell_detectors/data_clump.rb +23 -56
- data/lib/reek/smell_detectors/nil_check.rb +1 -12
- data/lib/reek/smell_detectors/subclassed_from_core_class.rb +3 -7
- data/lib/reek/smell_detectors/too_many_constants.rb +1 -1
- data/lib/reek/smell_warning.rb +18 -14
- data/lib/reek/source/source_code.rb +3 -2
- data/lib/reek/spec/smell_matcher.rb +2 -1
- data/lib/reek/version.rb +1 -1
- data/reek.gemspec +5 -6
- data/spec/reek/ast/sexp_extensions_spec.rb +15 -33
- data/spec/reek/cli/application_spec.rb +1 -1
- data/spec/reek/code_comment_spec.rb +41 -42
- data/spec/reek/configuration/directory_directives_spec.rb +6 -0
- data/spec/reek/context_builder_spec.rb +110 -113
- data/spec/reek/examiner_spec.rb +1 -0
- data/spec/reek/report/code_climate/code_climate_configuration_spec.rb +1 -3
- data/spec/reek/report/code_climate/code_climate_fingerprint_spec.rb +26 -26
- data/spec/reek/report/code_climate/code_climate_formatter_spec.rb +6 -6
- data/spec/reek/report/code_climate/code_climate_report_spec.rb +1 -1
- data/spec/reek/report/json_report_spec.rb +1 -1
- data/spec/reek/report/location_formatter_spec.rb +3 -3
- data/spec/reek/report/text_report_spec.rb +1 -7
- data/spec/reek/report/yaml_report_spec.rb +1 -1
- data/spec/reek/smell_configuration_spec.rb +2 -0
- data/spec/reek/smell_detectors/base_detector_spec.rb +3 -16
- data/spec/reek/smell_detectors/data_clump_spec.rb +14 -0
- data/spec/reek/smell_detectors/missing_safe_method_spec.rb +8 -2
- data/spec/reek/smell_detectors/nil_check_spec.rb +3 -3
- data/spec/reek/smell_warning_spec.rb +17 -28
- data/spec/reek/source/source_code_spec.rb +13 -0
- data/spec/reek/spec/should_reek_of_spec.rb +0 -1
- data/spec/reek/spec/should_reek_only_of_spec.rb +6 -13
- data/spec/reek/spec/smell_matcher_spec.rb +1 -2
- data/spec/spec_helper.rb +20 -6
- metadata +11 -26
- data/spec/factories/factories.rb +0 -48
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 107593e309020bb2745d630599f8bf33bde2c9f708877895465cd12360267f82
|
4
|
+
data.tar.gz: 61290a2608c069e4c5977720e5a1d99fe8d4e716dfaa8503c0491b226790a8a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09025ee922070bcb0c415f82fd5591e6658610a661ae4fc24abb472f16df6c3ed222fcfd84f81500a1951cadfabfb33b5c9414e26164f67cc140699774a9d2e7'
|
7
|
+
data.tar.gz: 7b9af8e1a09c5722fbedd946389411dee5aa7a5b98f03f48330a9d7f76d4c126bf170fff94955af6abe7a3a6c2e4b1b046c1fd1b8e304ee678a0fbecb52919f1
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -2,16 +2,17 @@ inherit_from: .rubocop_todo.yml
|
|
2
2
|
|
3
3
|
require:
|
4
4
|
- rubocop-rspec
|
5
|
+
- rubocop-performance
|
5
6
|
|
6
7
|
AllCops:
|
7
8
|
Exclude:
|
8
9
|
- 'samples/**/*'
|
9
10
|
- 'tmp/**/*'
|
10
11
|
- 'vendor/**/*'
|
11
|
-
TargetRubyVersion: 2.
|
12
|
+
TargetRubyVersion: 2.4
|
12
13
|
|
13
14
|
# Tables are nice
|
14
|
-
Layout/
|
15
|
+
Layout/HashAlignment:
|
15
16
|
EnforcedColonStyle: table
|
16
17
|
EnforcedHashRocketStyle: table
|
17
18
|
EnforcedLastArgumentHashStyle: ignore_implicit
|
@@ -24,6 +25,10 @@ Layout/DotPosition:
|
|
24
25
|
Layout/EmptyLineBetweenDefs:
|
25
26
|
AllowAdjacentOneLineDefs: true
|
26
27
|
|
28
|
+
# Be rather lenient with line length
|
29
|
+
Layout/LineLength:
|
30
|
+
Max: 120
|
31
|
+
|
27
32
|
# Always put the closing brace on the last line
|
28
33
|
Layout/MultilineMethodCallBraceLayout:
|
29
34
|
EnforcedStyle: same_line
|
@@ -54,10 +59,6 @@ Metrics/BlockLength:
|
|
54
59
|
Exclude:
|
55
60
|
- 'spec/**/*'
|
56
61
|
|
57
|
-
# Be rather lenient with line length
|
58
|
-
Metrics/LineLength:
|
59
|
-
Max: 120
|
60
|
-
|
61
62
|
# Keyword arguments make long parameter lists readable
|
62
63
|
Metrics/ParameterLists:
|
63
64
|
CountKeywordArgs: false
|
@@ -129,3 +130,23 @@ Style/WordArray:
|
|
129
130
|
Metrics/ClassLength:
|
130
131
|
Exclude:
|
131
132
|
- 'lib/reek/cli/options.rb'
|
133
|
+
|
134
|
+
# Activate new cops from RuboCop 0.80 - 0.83
|
135
|
+
Lint/RaiseException:
|
136
|
+
Enabled: true
|
137
|
+
Lint/StructNewOverride:
|
138
|
+
Enabled: true
|
139
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
140
|
+
Enabled: true
|
141
|
+
Layout/SpaceAroundMethodCallOperator:
|
142
|
+
Enabled: true
|
143
|
+
Style/ExponentialNotation:
|
144
|
+
Enabled: true
|
145
|
+
Style/HashEachMethods:
|
146
|
+
Enabled: true
|
147
|
+
Style/HashTransformKeys:
|
148
|
+
Enabled: true
|
149
|
+
Style/HashTransformValues:
|
150
|
+
Enabled: true
|
151
|
+
Style/SlicingWithRange:
|
152
|
+
Enabled: true
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2019-12-22 13:19:30 +0100 using RuboCop version 0.78.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -15,7 +15,7 @@ Metrics/AbcSize:
|
|
15
15
|
Metrics/ClassLength:
|
16
16
|
Max: 161
|
17
17
|
|
18
|
-
# Offense count:
|
18
|
+
# Offense count: 14
|
19
19
|
# Configuration parameters: CountComments, ExcludedMethods.
|
20
20
|
Metrics/MethodLength:
|
21
21
|
Max: 16
|
@@ -55,8 +55,8 @@ RSpec/NestedGroups:
|
|
55
55
|
|
56
56
|
# Offense count: 2
|
57
57
|
# Cop supports --auto-correct.
|
58
|
-
# Configuration parameters: ConvertCodeThatCanStartToReturnNil,
|
59
|
-
#
|
58
|
+
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
|
59
|
+
# AllowedMethods: present?, blank?, presence, try, try!
|
60
60
|
Style/SafeNavigation:
|
61
61
|
Exclude:
|
62
62
|
- 'lib/reek/ast/node.rb'
|
data/.simplecov
CHANGED
data/.travis.yml
CHANGED
@@ -1,34 +1,36 @@
|
|
1
|
-
dist: trusty
|
2
|
-
cache: bundler
|
3
1
|
language: ruby
|
2
|
+
|
3
|
+
dist: xenial
|
4
|
+
|
5
|
+
cache:
|
6
|
+
bundler: true
|
7
|
+
|
4
8
|
bundler_args: --without debugging
|
5
|
-
|
6
|
-
# Avoid Java announcing _JAVA_OPTIONS environment variable
|
7
|
-
# See https://github.com/travis-ci/travis-ci/issues/8408
|
8
|
-
- unset _JAVA_OPTIONS
|
9
|
+
|
9
10
|
script: bundle exec rake ci
|
11
|
+
|
10
12
|
rvm:
|
11
|
-
- 2.3
|
12
13
|
- 2.4
|
13
14
|
- 2.5
|
14
15
|
- 2.6
|
15
|
-
-
|
16
|
-
- jruby-9.2
|
16
|
+
- 2.7
|
17
|
+
- jruby-9.2
|
17
18
|
- jruby-head
|
18
19
|
- ruby-head
|
19
|
-
|
20
|
+
|
20
21
|
matrix:
|
21
22
|
allow_failures:
|
22
23
|
- rvm: jruby-head
|
23
24
|
- rvm: ruby-head
|
24
|
-
- rvm: rubinius-3
|
25
25
|
fast_finish: true
|
26
|
+
|
26
27
|
notifications:
|
27
28
|
email:
|
28
29
|
- timo.roessner@googlemail.com
|
29
30
|
- matijs@matijs.net
|
30
31
|
- chastell@chastell.net
|
31
32
|
irc: irc.freenode.org#reek
|
33
|
+
|
32
34
|
branches:
|
33
35
|
only:
|
34
36
|
- master
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,32 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
-
##
|
3
|
+
## 6.0.1 (2020-05-26)
|
4
|
+
|
5
|
+
* (Maxim Pertsov) Handle absolute paths for directories correctly
|
6
|
+
|
7
|
+
## 6.0.0 (2020-03-30)
|
8
|
+
|
9
|
+
* (mvz) Make codeclimate-engine-rb a development dependency
|
10
|
+
* (mvz) Drop support for Ruby 2.3
|
11
|
+
* (mvz) Raise error when legacy code comment format is used
|
12
|
+
* (mvz) Stop reporting NilCheck for safe navigation
|
13
|
+
* (likeath) Properly handle "Forward all" syntax
|
14
|
+
|
15
|
+
## 5.6.0 (2020-01-20)
|
16
|
+
|
17
|
+
* (mvz) Support Ruby 2.7
|
18
|
+
* (mvz) Loosen parser dependency to allow version 2.7.x
|
19
|
+
|
20
|
+
## 5.5.0 (2019-11-13)
|
21
|
+
|
22
|
+
* (mvz) Use the Parser class matching current ruby for parsing, instead of
|
23
|
+
always picking version 2.6.
|
24
|
+
|
25
|
+
## 5.4.1 (2019-11-12)
|
26
|
+
|
27
|
+
* (Filipe Esperandio) Bump base Docker image to a more recent ruby version
|
28
|
+
* (Fernando Contreras) Add quotes inside directory configuration example in
|
29
|
+
README
|
4
30
|
|
5
31
|
## 5.4.0 (2019-04-24)
|
6
32
|
|
data/Dockerfile
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# Build and run via:
|
4
4
|
# docker build -t codeclimate/codeclimate-reek . && docker run codeclimate/codeclimate-reek
|
5
5
|
|
6
|
-
FROM ruby:2.
|
6
|
+
FROM ruby:2.6.0-alpine
|
7
7
|
|
8
8
|
MAINTAINER The Reek core team
|
9
9
|
|
@@ -22,6 +22,7 @@ WORKDIR ${app_dir}
|
|
22
22
|
|
23
23
|
RUN gem install rake
|
24
24
|
RUN bundle install --without debugging development
|
25
|
+
RUN gem install codeclimate-engine-rb
|
25
26
|
|
26
27
|
VOLUME ${code_dir}
|
27
28
|
WORKDIR ${code_dir}
|
data/Gemfile
CHANGED
@@ -5,27 +5,25 @@ gemspec
|
|
5
5
|
ruby RUBY_VERSION
|
6
6
|
|
7
7
|
group :development do
|
8
|
-
gem 'aruba',
|
9
|
-
gem '
|
10
|
-
gem '
|
11
|
-
gem 'kramdown',
|
12
|
-
gem 'kramdown-parser-gfm',
|
13
|
-
gem 'rake',
|
14
|
-
gem 'rspec',
|
15
|
-
gem 'rspec-benchmark',
|
16
|
-
gem 'rubocop',
|
17
|
-
gem 'rubocop-
|
18
|
-
gem '
|
19
|
-
gem '
|
8
|
+
gem 'aruba', '~> 1.0'
|
9
|
+
gem 'codeclimate-engine-rb', '~> 0.4.0'
|
10
|
+
gem 'cucumber', '~> 3.0'
|
11
|
+
gem 'kramdown', '~> 2.1'
|
12
|
+
gem 'kramdown-parser-gfm', '~> 1.0'
|
13
|
+
gem 'rake', '~> 13.0'
|
14
|
+
gem 'rspec', '~> 3.0'
|
15
|
+
gem 'rspec-benchmark', '~> 0.6.0'
|
16
|
+
gem 'rubocop', '~> 0.83.0'
|
17
|
+
gem 'rubocop-performance', '~> 1.5.0'
|
18
|
+
gem 'rubocop-rspec', '~> 1.39.0'
|
19
|
+
gem 'simplecov', '~> 0.18.1'
|
20
|
+
gem 'yard', '~> 0.9.5'
|
20
21
|
|
21
22
|
platforms :mri do
|
22
|
-
gem 'redcarpet', '~> 3.4
|
23
|
+
gem 'redcarpet', '~> 3.4'
|
23
24
|
end
|
24
25
|
end
|
25
26
|
|
26
27
|
group :debugging do
|
27
|
-
gem 'pry'
|
28
|
-
platforms :mri do
|
29
|
-
gem 'pry-byebug'
|
30
|
-
end
|
28
|
+
gem 'pry', '~> 0.13.0'
|
31
29
|
end
|
data/README.md
CHANGED
@@ -45,12 +45,6 @@
|
|
45
45
|
* ![](http://ruby-gem-downloads-badge.herokuapp.com/reek?type=total)
|
46
46
|
* ![](http://ruby-gem-downloads-badge.herokuapp.com/reek?label=downloads-current-version)
|
47
47
|
|
48
|
-
## Reek 5 is out!
|
49
|
-
|
50
|
-
Reek 5 is out and with it a bunch of breaking changes. If you're a new user you can just
|
51
|
-
continue with the quickstart below. If you're a Reek 4 user and would like to upgrade to 5, don't
|
52
|
-
worry, this shouldn't take you more than 10 minutes. Check out our [Upgrade Guide](docs/Reek-4-to-Reek-5-migration.md).
|
53
|
-
|
54
48
|
## Quickstart
|
55
49
|
|
56
50
|
Reek is a tool that examines Ruby classes, modules and methods and reports any
|
@@ -100,10 +94,14 @@ demo.rb -- 2 warnings:
|
|
100
94
|
|
101
95
|
## Supported Ruby versions
|
102
96
|
|
103
|
-
Reek is officially supported for CRuby 2.
|
97
|
+
Reek is officially supported for CRuby 2.4 to 2.7 and for JRuby 9.2.
|
104
98
|
Other Ruby implementations (like Rubinius) are not officially supported but
|
105
99
|
should work as well.
|
106
100
|
|
101
|
+
Note that, on each Ruby version, Reek will use the parser for that version of
|
102
|
+
Ruby. So, you should always run Reek using one of your project's target Ruby
|
103
|
+
versions.
|
104
|
+
|
107
105
|
## Fixing Smell Warnings
|
108
106
|
|
109
107
|
Reek focuses on high-level code smells, so we can't tell you how to fix warnings in
|
@@ -288,7 +286,7 @@ detectors:
|
|
288
286
|
# You can disable smells completely
|
289
287
|
IrresponsibleModule:
|
290
288
|
enabled: false
|
291
|
-
|
289
|
+
|
292
290
|
# You can use filters to silence Reek warnings.
|
293
291
|
# Either because you simply disagree with Reek (we are not the police) or
|
294
292
|
# because you want to fix this at a later point in time.
|
@@ -296,7 +294,7 @@ detectors:
|
|
296
294
|
exclude:
|
297
295
|
- "MyWorker#self.class_method" # should be refactored
|
298
296
|
- "AnotherWorker#instance_method" # should be refactored as well
|
299
|
-
|
297
|
+
|
300
298
|
# A lot of smells allow fine tuning their configuration. You can look up all available options
|
301
299
|
# in the corresponding smell documentation in /docs. In most cases you probably can just go
|
302
300
|
# with the defaults as documented in defaults.reek.yml.
|
@@ -317,7 +315,7 @@ directories:
|
|
317
315
|
"web_app/app/controllers":
|
318
316
|
NestedIterators:
|
319
317
|
enabled: false
|
320
|
-
"web_app/app/helpers
|
318
|
+
"web_app/app/helpers**":
|
321
319
|
UtilityFunction:
|
322
320
|
enabled: false
|
323
321
|
"web_app/lib/**/test/**":
|
@@ -351,9 +349,14 @@ This configuration for instance:
|
|
351
349
|
detectors:
|
352
350
|
IrresponsibleModule:
|
353
351
|
enabled: false
|
354
|
-
|
352
|
+
|
355
353
|
TooManyStatements:
|
356
354
|
max_statements: 5
|
355
|
+
|
356
|
+
directories:
|
357
|
+
"app/controllers":
|
358
|
+
TooManyStatements:
|
359
|
+
max_statements: 10
|
357
360
|
```
|
358
361
|
|
359
362
|
translates to:
|
@@ -609,6 +612,7 @@ Be careful though, Reek does not merge your configuration entries, so if you alr
|
|
609
612
|
Reek
|
610
613
|
* [ruby-critic](https://github.com/whitesmith/rubycritic) - gem that wraps around static analysis gems such as Reek, [flay](https://github.com/seattlerb/flay) and [flog](https://github.com/seattlerb/flog)
|
611
614
|
* [pronto-reek](https://github.com/mmozuras/pronto-reek) - Reek integration for [pronto](https://github.com/mmozuras/pronto)
|
615
|
+
* [action-reek](https://github.com/reviewdog/action-reek) - GitHub Action to run reek with [reviewdog](https://github.com/reviewdog/reviewdog) 🐶
|
612
616
|
|
613
617
|
### Misc
|
614
618
|
|
data/bin/code_climate_reek
CHANGED
@@ -6,15 +6,16 @@
|
|
6
6
|
|
7
7
|
require_relative '../lib/reek'
|
8
8
|
require_relative '../lib/reek/cli/application'
|
9
|
+
require_relative '../lib/reek/report/code_climate'
|
9
10
|
|
10
11
|
# Map input coming from CodeClimate to Reek.
|
11
12
|
class CodeClimateToReek
|
12
13
|
# Following the spec (https://github.com/codeclimate/spec/blob/master/SPEC.md)
|
13
14
|
# we have to exit with a zero for both failure and success.
|
14
15
|
ENGINE_CONFIGURATION = [
|
15
|
-
'-f', 'code_climate',
|
16
16
|
'--failure-exit-code', '0',
|
17
|
-
'--success-exit-code', '0'
|
17
|
+
'--success-exit-code', '0',
|
18
|
+
'.'
|
18
19
|
].freeze
|
19
20
|
|
20
21
|
attr_reader :configuration_file_path, :include_paths_key, :include_paths_default
|
@@ -54,6 +55,15 @@ class CodeClimateToReek
|
|
54
55
|
end
|
55
56
|
end
|
56
57
|
|
58
|
+
# Override for ReportCommand to force the use of CodeClimateReport.
|
59
|
+
module ReportClassOverride
|
60
|
+
def report_class
|
61
|
+
Reek::Report::CodeClimateReport
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
Reek::CLI::Command::ReportCommand.prepend ReportClassOverride
|
66
|
+
|
57
67
|
application = Reek::CLI::Application.new(CodeClimateToReek.new.cli_arguments)
|
58
68
|
|
59
69
|
exit application.execute
|
data/docs/Attribute.md
CHANGED
@@ -29,7 +29,7 @@ test.rb -- 1 warning:
|
|
29
29
|
|
30
30
|
## Support in Reek
|
31
31
|
|
32
|
-
This detector
|
32
|
+
This detector raises a warning for every public `attr_writer`,
|
33
33
|
`attr_accessor`, and `attr` with the writable flag set to `true`.
|
34
34
|
|
35
35
|
Reek does not raise warnings for read-only attributes.
|
data/docs/Control-Couple.md
CHANGED
@@ -14,7 +14,7 @@ controlling parameter must be reflected on both sides of the call. A _Control
|
|
14
14
|
Couple_ also reveals a loss of simplicity: the called method probably has more
|
15
15
|
than one responsibility, because it includes at least two different code paths.
|
16
16
|
|
17
|
-
You can find a good write-up regarding this problem [here](
|
17
|
+
You can find a good write-up regarding this problem [here](https://solnic.codes/2012/04/11/get-rid-of-that-code-smell-control-couple/).
|
18
18
|
|
19
19
|
## Current Support in Reek
|
20
20
|
|
data/docs/Nil-Check.md
CHANGED
@@ -37,7 +37,10 @@ _Nil Check_ reports use of
|
|
37
37
|
* <code>.nil?</code> method
|
38
38
|
* <code>==</code> and <code>===</code> operators when checking vs. <code>nil</code>
|
39
39
|
* case statements that use syntax like <code>when nil</code>
|
40
|
-
|
40
|
+
|
41
|
+
_Nil Check_ allows use of
|
42
|
+
|
43
|
+
* the safe navigation operator like `foo&.bar`
|
41
44
|
|
42
45
|
## Configuration
|
43
46
|
|
@@ -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/
|
46
|
+
Check out https://github.com/troessner/reek/blob/v6.0.1/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:
|
@@ -56,7 +56,6 @@ Feature: Reek can be controlled using command-line options
|
|
56
56
|
yaml
|
57
57
|
json
|
58
58
|
xml
|
59
|
-
code_climate
|
60
59
|
|
61
60
|
Text format options:
|
62
61
|
--[no-]color Use colors for the output (default: true)
|
@@ -120,5 +119,5 @@ Feature: Reek can be controlled using command-line options
|
|
120
119
|
UnusedPrivateMethod
|
121
120
|
UtilityFunction
|
122
121
|
|
123
|
-
Check out https://github.com/troessner/reek/blob/
|
122
|
+
Check out https://github.com/troessner/reek/blob/v6.0.1/docs/Code-Smells.md for a details on each detector
|
124
123
|
"""
|
@@ -4,7 +4,7 @@ Feature: Report smells using Code Climate format
|
|
4
4
|
|
5
5
|
Scenario: output is empty when there are no smells
|
6
6
|
Given a directory called 'clean' containing two clean files
|
7
|
-
When I run
|
7
|
+
When I run the code climate reek runner
|
8
8
|
Then it succeeds
|
9
9
|
And it reports this Code Climate output:
|
10
10
|
"""
|
@@ -12,7 +12,7 @@ Feature: Report smells using Code Climate format
|
|
12
12
|
|
13
13
|
Scenario: Indicate smells and print them as JSON when using files
|
14
14
|
Given the smelly file 'smelly.rb'
|
15
|
-
When I run
|
15
|
+
When I run the code climate reek runner
|
16
16
|
Then it reports this Code Climate output:
|
17
17
|
"""
|
18
18
|
{
|