reek 5.5.0 → 6.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +9 -0
  3. data/.github/workflows/ruby.yml +52 -0
  4. data/.gitignore +1 -0
  5. data/.rubocop.yml +8 -6
  6. data/.rubocop_todo.yml +28 -21
  7. data/.simplecov +1 -0
  8. data/CHANGELOG.md +29 -0
  9. data/Dockerfile +1 -0
  10. data/Gemfile +14 -17
  11. data/README.md +11 -11
  12. data/bin/code_climate_reek +12 -2
  13. data/docs/Attribute.md +1 -1
  14. data/docs/Boolean-Parameter.md +2 -2
  15. data/docs/Control-Couple.md +1 -1
  16. data/docs/Nil-Check.md +4 -1
  17. data/docs/templates/default/docstring/setup.rb +1 -3
  18. data/features/command_line_interface/options.feature +2 -3
  19. data/features/configuration_files/schema_validation.feature +1 -1
  20. data/features/reports/codeclimate.feature +2 -2
  21. data/features/reports/json.feature +3 -3
  22. data/features/reports/reports.feature +4 -4
  23. data/features/reports/yaml.feature +3 -3
  24. data/features/step_definitions/reek_steps.rb +5 -1
  25. data/features/step_definitions/sample_file_steps.rb +2 -2
  26. data/features/support/env.rb +1 -2
  27. data/lib/reek.rb +1 -0
  28. data/lib/reek/ast/node.rb +1 -1
  29. data/lib/reek/ast/sexp_extensions/arguments.rb +11 -0
  30. data/lib/reek/cli/options.rb +3 -3
  31. data/lib/reek/code_comment.rb +45 -38
  32. data/lib/reek/configuration/app_configuration.rb +4 -3
  33. data/lib/reek/configuration/configuration_converter.rb +2 -2
  34. data/lib/reek/configuration/directory_directives.rb +9 -3
  35. data/lib/reek/configuration/excluded_paths.rb +2 -1
  36. data/lib/reek/context/code_context.rb +1 -1
  37. data/lib/reek/context/module_context.rb +3 -1
  38. data/lib/reek/context/refinement_context.rb +16 -0
  39. data/lib/reek/context_builder.rb +16 -2
  40. data/lib/reek/errors/legacy_comment_separator_error.rb +36 -0
  41. data/lib/reek/examiner.rb +3 -3
  42. data/lib/reek/report.rb +5 -7
  43. data/lib/reek/report/code_climate/code_climate_configuration.yml +1 -1
  44. data/lib/reek/report/code_climate/code_climate_report.rb +2 -1
  45. data/lib/reek/report/simple_warning_formatter.rb +0 -7
  46. data/lib/reek/report/text_report.rb +2 -2
  47. data/lib/reek/smell_detectors/base_detector.rb +1 -9
  48. data/lib/reek/smell_detectors/boolean_parameter.rb +3 -1
  49. data/lib/reek/smell_detectors/data_clump.rb +23 -56
  50. data/lib/reek/smell_detectors/nil_check.rb +1 -12
  51. data/lib/reek/smell_detectors/subclassed_from_core_class.rb +3 -7
  52. data/lib/reek/smell_detectors/uncommunicative_variable_name.rb +1 -1
  53. data/lib/reek/smell_warning.rb +1 -2
  54. data/lib/reek/source/source_locator.rb +13 -10
  55. data/lib/reek/spec/smell_matcher.rb +2 -1
  56. data/lib/reek/version.rb +1 -1
  57. data/reek.gemspec +13 -6
  58. data/spec/performance/reek/smell_detectors/runtime_speed_spec.rb +2 -4
  59. data/spec/quality/documentation_spec.rb +2 -1
  60. data/spec/reek/ast/sexp_extensions_spec.rb +15 -33
  61. data/spec/reek/code_comment_spec.rb +41 -42
  62. data/spec/reek/configuration/directory_directives_spec.rb +6 -0
  63. data/spec/reek/configuration/excluded_paths_spec.rb +12 -3
  64. data/spec/reek/context_builder_spec.rb +110 -113
  65. data/spec/reek/report/code_climate/code_climate_configuration_spec.rb +1 -3
  66. data/spec/reek/report/code_climate/code_climate_fingerprint_spec.rb +26 -26
  67. data/spec/reek/report/code_climate/code_climate_formatter_spec.rb +6 -6
  68. data/spec/reek/report/code_climate/code_climate_report_spec.rb +1 -1
  69. data/spec/reek/report/json_report_spec.rb +1 -1
  70. data/spec/reek/report/location_formatter_spec.rb +3 -3
  71. data/spec/reek/report/text_report_spec.rb +1 -7
  72. data/spec/reek/report/yaml_report_spec.rb +1 -1
  73. data/spec/reek/smell_detectors/base_detector_spec.rb +3 -13
  74. data/spec/reek/smell_detectors/data_clump_spec.rb +14 -0
  75. data/spec/reek/smell_detectors/missing_safe_method_spec.rb +8 -2
  76. data/spec/reek/smell_detectors/nil_check_spec.rb +3 -3
  77. data/spec/reek/smell_detectors/utility_function_spec.rb +16 -0
  78. data/spec/reek/smell_warning_spec.rb +12 -12
  79. data/spec/reek/source/source_code_spec.rb +13 -0
  80. data/spec/reek/spec/should_reek_of_spec.rb +0 -1
  81. data/spec/reek/spec/should_reek_only_of_spec.rb +6 -6
  82. data/spec/reek/spec/smell_matcher_spec.rb +1 -1
  83. data/spec/spec_helper.rb +20 -6
  84. data/tasks/configuration.rake +1 -2
  85. metadata +24 -42
  86. data/.travis.yml +0 -34
  87. data/spec/factories/factories.rb +0 -37
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b3b65a38361c8f39a732b5902f9ee84181d3c90da8af1c4fcb7445f1b9c2471
4
- data.tar.gz: 7dc904ae5e9f98b757a7c007e1d96bf86773f6024b823cf0fe564a95304ed826
3
+ metadata.gz: 967e95555fe823e1924a78ff2a8c94c40bdb4d16d031bacd51b885d1475bce30
4
+ data.tar.gz: c9760389b64b3bb9f96f1896192a540a4de8b7f395808299b9a67e47238e8c42
5
5
  SHA512:
6
- metadata.gz: 6534b0dd5502776c06443bcd1b9fc5047179e93511ed2ea1ea507c4566a5e5bb53b3f6bd697045771e060e1332698c6141e1437f6a26bac66db597e0d5116fd7
7
- data.tar.gz: 235d484485c0d7d01bde1acb4b268431010505f69d2a8b7fcd1ce14016cbad9854aa09b9a42ea4db0f8489b75d0c711f937b021d0140a57813e4e5774ed8a00c
6
+ metadata.gz: ea4c588166903c10bed44c2a459e43e4db479943f8f489ca1eaefbb6db375605e06ff678f5411def292e19ef8c2754245bca78eb24373532474091b0ab8eadbe
7
+ data.tar.gz: 9e0804841d54d4278149422d66c7e379597e3f99275ba8b9ab4aef6e7041bde6c928db5f3c62a3b5c3d1d6fc4da0216ba5d13aa5562f9e0b565ec31bb115d0fe
@@ -0,0 +1,9 @@
1
+ # Documentation for all configuration options:
2
+ # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3
+
4
+ version: 2
5
+ updates:
6
+ - package-ecosystem: "bundler"
7
+ directory: "/"
8
+ schedule:
9
+ interval: "daily"
@@ -0,0 +1,52 @@
1
+ # This workflow will download a prebuilt Ruby version, install dependencies and
2
+ # run tests with Rake
3
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
4
+
5
+ name: Ruby
6
+
7
+ on:
8
+ push:
9
+ branches: [ master ]
10
+ pull_request:
11
+ branches: [ master ]
12
+
13
+ jobs:
14
+ test:
15
+
16
+ runs-on: ubuntu-latest
17
+
18
+ strategy:
19
+ matrix:
20
+ ruby: [2.4, 2.5, 2.6, 2.7, jruby-9.2]
21
+
22
+ steps:
23
+ - uses: actions/checkout@v2
24
+ - name: Set up Ruby
25
+ uses: ruby/setup-ruby@v1
26
+ with:
27
+ ruby-version: ${{ matrix.ruby }}
28
+ bundler-cache: true
29
+ - name: Run specs
30
+ run: bundle exec rake test:spec
31
+ - name: Run performance tests
32
+ run: bundle exec rake test:performance
33
+ - name: Update default configuration
34
+ run: bundle exec rake configuration:update_default_configuration
35
+ - name: Run cucumber features
36
+ run: bundle exec rake test:features
37
+ - name: Run code quality specs
38
+ run: bundle exec rake test:quality
39
+
40
+ rubocop:
41
+
42
+ runs-on: ubuntu-latest
43
+
44
+ steps:
45
+ - uses: actions/checkout@v2
46
+ - name: Set up Ruby
47
+ uses: ruby/setup-ruby@v1
48
+ with:
49
+ ruby-version: 2.7
50
+ bundler-cache: true
51
+ - name: Run RuboCop
52
+ run: bundle exec rubocop -P
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  pkg
2
+ spec/examples.txt
2
3
  spec/output
3
4
  tmp
4
5
  doc
@@ -9,10 +9,11 @@ AllCops:
9
9
  - 'samples/**/*'
10
10
  - 'tmp/**/*'
11
11
  - 'vendor/**/*'
12
- TargetRubyVersion: 2.3
12
+ NewCops: enable
13
+ TargetRubyVersion: 2.4
13
14
 
14
15
  # Tables are nice
15
- Layout/AlignHash:
16
+ Layout/HashAlignment:
16
17
  EnforcedColonStyle: table
17
18
  EnforcedHashRocketStyle: table
18
19
  EnforcedLastArgumentHashStyle: ignore_implicit
@@ -25,6 +26,10 @@ Layout/DotPosition:
25
26
  Layout/EmptyLineBetweenDefs:
26
27
  AllowAdjacentOneLineDefs: true
27
28
 
29
+ # Be rather lenient with line length
30
+ Layout/LineLength:
31
+ Max: 120
32
+
28
33
  # Always put the closing brace on the last line
29
34
  Layout/MultilineMethodCallBraceLayout:
30
35
  EnforcedStyle: same_line
@@ -53,12 +58,9 @@ Lint/BooleanSymbol:
53
58
  # Spec blocks can be any size
54
59
  Metrics/BlockLength:
55
60
  Exclude:
61
+ - '**/*.gemspec'
56
62
  - 'spec/**/*'
57
63
 
58
- # Be rather lenient with line length
59
- Metrics/LineLength:
60
- Max: 120
61
-
62
64
  # Keyword arguments make long parameter lists readable
63
65
  Metrics/ParameterLists:
64
66
  CountKeywordArgs: false
@@ -1,22 +1,36 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-11-04 12:41:28 +0100 using RuboCop version 0.60.0.
3
+ # on 2021-01-03 18:17:11 UTC using RuboCop version 1.7.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
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 3
9
+ # Offense count: 2
10
+ Lint/MissingSuper:
11
+ Exclude:
12
+ - 'lib/reek/rake/task.rb'
13
+ - 'lib/reek/smell_detectors/base_detector.rb'
14
+
15
+ # Offense count: 2
16
+ # Configuration parameters: IgnoredPatterns.
17
+ # IgnoredPatterns: (?-mix:(exactly|at_least|at_most)\(\d+\)\.times)
18
+ Lint/UnreachableLoop:
19
+ Exclude:
20
+ - 'spec/reek/ast/node_spec.rb'
21
+
22
+ # Offense count: 2
23
+ # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
10
24
  Metrics/AbcSize:
11
25
  Max: 21
12
26
 
13
27
  # Offense count: 1
14
- # Configuration parameters: CountComments.
28
+ # Configuration parameters: CountComments, CountAsOne.
15
29
  Metrics/ClassLength:
16
- Max: 161
30
+ Max: 170
17
31
 
18
32
  # Offense count: 13
19
- # Configuration parameters: CountComments, ExcludedMethods.
33
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
20
34
  Metrics/MethodLength:
21
35
  Max: 16
22
36
 
@@ -25,17 +39,6 @@ RSpec/AnyInstance:
25
39
  Exclude:
26
40
  - 'spec/reek/cli/application_spec.rb'
27
41
 
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
42
  # Offense count: 4
40
43
  RSpec/MultipleDescribes:
41
44
  Exclude:
@@ -44,19 +47,23 @@ RSpec/MultipleDescribes:
44
47
  - 'spec/reek/report/location_formatter_spec.rb'
45
48
  - 'spec/reek/report/progress_formatter_spec.rb'
46
49
 
47
- # Offense count: 32
48
- # Configuration parameters: AggregateFailuresByDefault.
50
+ # Offense count: 30
49
51
  RSpec/MultipleExpectations:
50
52
  Max: 5
51
53
 
52
- # Offense count: 25
54
+ # Offense count: 16
55
+ # Configuration parameters: AllowSubject.
56
+ RSpec/MultipleMemoizedHelpers:
57
+ Max: 9
58
+
59
+ # Offense count: 27
53
60
  RSpec/NestedGroups:
54
61
  Max: 5
55
62
 
56
63
  # Offense count: 2
57
64
  # Cop supports --auto-correct.
58
- # Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
59
- # Whitelist: present?, blank?, presence, try, try!
65
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
66
+ # AllowedMethods: present?, blank?, presence, try, try!
60
67
  Style/SafeNavigation:
61
68
  Exclude:
62
69
  - 'lib/reek/ast/node.rb'
data/.simplecov CHANGED
@@ -5,6 +5,7 @@ SimpleCov.start do
5
5
  add_filter 'spec/'
6
6
  add_filter 'samples/'
7
7
  coverage_dir 'tmp/coverage'
8
+ enable_coverage :branch
8
9
  end
9
10
 
10
11
  SimpleCov.at_exit do
@@ -1,5 +1,34 @@
1
1
  # Change log
2
2
 
3
+ ## 6.0.3 (2021-01-11)
4
+
5
+ * (mvz) Require parser 3.0
6
+ * (mvz) In a refinement, assign smells to the refined module or class
7
+
8
+ ## 6.0.3 (2020-10-17)
9
+
10
+ * (mvz) Loosen dependency on psych. This should resolve installation problems on
11
+ mingw32
12
+ * (Cesario Uy) Fix typo in docs for "Boolean Parameter" smell
13
+ * (mvz) Set link metadata in gemspec
14
+
15
+ ## 6.0.1 (2020-05-26)
16
+
17
+ * (Maxim Pertsov) Handle absolute paths for directories correctly
18
+
19
+ ## 6.0.0 (2020-03-30)
20
+
21
+ * (mvz) Make codeclimate-engine-rb a development dependency
22
+ * (mvz) Drop support for Ruby 2.3
23
+ * (mvz) Raise error when legacy code comment format is used
24
+ * (mvz) Stop reporting NilCheck for safe navigation
25
+ * (likeath) Properly handle "Forward all" syntax
26
+
27
+ ## 5.6.0 (2020-01-20)
28
+
29
+ * (mvz) Support Ruby 2.7
30
+ * (mvz) Loosen parser dependency to allow version 2.7.x
31
+
3
32
  ## 5.5.0 (2019-11-13)
4
33
 
5
34
  * (mvz) Use the Parser class matching current ruby for parsing, instead of
data/Dockerfile CHANGED
@@ -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,19 +5,19 @@ gemspec
5
5
  ruby RUBY_VERSION
6
6
 
7
7
  group :development do
8
- gem 'aruba', '~> 0.14.8'
9
- gem 'cucumber', '~> 3.0'
10
- gem 'factory_bot', '~> 5.0', '!= 5.1.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.5.0'
16
- gem 'rubocop', '~> 0.75.0'
17
- gem 'rubocop-performance', '~> 1.5.0'
18
- gem 'rubocop-rspec', '~> 1.36.0'
19
- gem 'simplecov', '~> 0.17.0'
20
- gem 'yard', '~> 0.9.5'
8
+ gem 'aruba', '~> 1.0'
9
+ gem 'codeclimate-engine-rb', '~> 0.4.0'
10
+ gem 'cucumber', ['>= 4.0', '< 6.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', '~> 1.7.0'
17
+ gem 'rubocop-performance', '~> 1.9.1'
18
+ gem 'rubocop-rspec', '~> 2.1.0'
19
+ gem 'simplecov', ['>= 0.18.0', '< 0.21.0']
20
+ gem 'yard', '~> 0.9.5'
21
21
 
22
22
  platforms :mri do
23
23
  gem 'redcarpet', '~> 3.4'
@@ -25,8 +25,5 @@ group :development do
25
25
  end
26
26
 
27
27
  group :debugging do
28
- gem 'pry'
29
- platforms :mri do
30
- gem 'pry-byebug'
31
- end
28
+ gem 'pry', '~> 0.13.0'
32
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,7 +94,7 @@ demo.rb -- 2 warnings:
100
94
 
101
95
  ## Supported Ruby versions
102
96
 
103
- Reek is officially supported for CRuby 2.3 to 2.6 and for JRuby 9.1 and 9.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
 
@@ -292,7 +286,7 @@ detectors:
292
286
  # You can disable smells completely
293
287
  IrresponsibleModule:
294
288
  enabled: false
295
-
289
+
296
290
  # You can use filters to silence Reek warnings.
297
291
  # Either because you simply disagree with Reek (we are not the police) or
298
292
  # because you want to fix this at a later point in time.
@@ -300,7 +294,7 @@ detectors:
300
294
  exclude:
301
295
  - "MyWorker#self.class_method" # should be refactored
302
296
  - "AnotherWorker#instance_method" # should be refactored as well
303
-
297
+
304
298
  # A lot of smells allow fine tuning their configuration. You can look up all available options
305
299
  # in the corresponding smell documentation in /docs. In most cases you probably can just go
306
300
  # with the defaults as documented in defaults.reek.yml.
@@ -355,9 +349,14 @@ This configuration for instance:
355
349
  detectors:
356
350
  IrresponsibleModule:
357
351
  enabled: false
358
-
352
+
359
353
  TooManyStatements:
360
354
  max_statements: 5
355
+
356
+ directories:
357
+ "app/controllers":
358
+ TooManyStatements:
359
+ max_statements: 10
361
360
  ```
362
361
 
363
362
  translates to:
@@ -374,7 +373,7 @@ are documented in the corresponding smell type /docs page (if you want to get a
374
373
  configurations you can also check out [the `defaults.reek.yml` file in this repository](docs/defaults.reek.yml).
375
374
 
376
375
  Note that you do not need a configuration file at all.
377
- If you're fine with all the [defaults.reek.yml](docs/defaults.reek.yml) we set you can skip this completely.
376
+ If you're fine with all the [defaults](docs/defaults.reek.yml) we set you can skip this completely.
378
377
 
379
378
  Don't worry about introducing a mistake in your configuration file that might go unnoticed - Reek uses a
380
379
  schema to validate your configuration against on start up and will faily loudly in case you
@@ -613,6 +612,7 @@ Be careful though, Reek does not merge your configuration entries, so if you alr
613
612
  Reek
614
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)
615
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) 🐶
616
616
 
617
617
  ### Misc
618
618
 
@@ -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
@@ -29,7 +29,7 @@ test.rb -- 1 warning:
29
29
 
30
30
  ## Support in Reek
31
31
 
32
- This detector it raises a warning for every public `attr_writer`,
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.
@@ -38,11 +38,11 @@ Note that both smells are reported, _Boolean Parameter_ and _Control Parameter_.
38
38
 
39
39
  ## Getting rid of the smell
40
40
 
41
- This is highly dependant on your exact architecture, but looking at the example above what you could do is:
41
+ This is highly dependent on your exact architecture, but looking at the example above what you could do is:
42
42
 
43
43
  * Move everything in the `if` branch into a separate method
44
44
  * Move everything in the `else` branch into a separate method
45
- * Get rid of the `hit_the_switch` method alltogether
45
+ * Get rid of the `hit_the_switch` method altogether
46
46
  * Make the decision what method to call in the initial caller of `hit_the_switch`
47
47
 
48
48
  ## Current support in Reek
@@ -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](http://solnic.eu/2012/04/11/get-rid-of-that-code-smell-control-couple.html).
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
 
@@ -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
- * use of the safe navigation operator like `foo&.bar`
40
+
41
+ _Nil Check_ allows use of
42
+
43
+ * the safe navigation operator like `foo&.bar`
41
44
 
42
45
  ## Configuration
43
46