reek 2.0.4 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +13 -0
  3. data/.rubocop.yml +66 -0
  4. data/.ruby-gemset +1 -0
  5. data/.travis.yml +25 -0
  6. data/CHANGELOG +6 -0
  7. data/CONTRIBUTING.md +106 -0
  8. data/Gemfile +14 -0
  9. data/README.md +16 -21
  10. data/bin/reek +2 -2
  11. data/config/cucumber.yml +3 -0
  12. data/config/defaults.reek +1 -1
  13. data/features/command_line_interface/smell_selection.feature +4 -8
  14. data/features/command_line_interface/smells_count.feature +25 -32
  15. data/features/command_line_interface/stdin.feature +2 -2
  16. data/features/configuration_files/masking_smells.feature +30 -41
  17. data/features/configuration_files/overrides_defaults.feature +5 -3
  18. data/features/configuration_loading.feature +26 -23
  19. data/features/programmatic_access.feature +24 -0
  20. data/features/rake_task/rake_task.feature +25 -22
  21. data/features/reports/json.feature +24 -26
  22. data/features/reports/reports.feature +77 -103
  23. data/features/reports/yaml.feature +26 -20
  24. data/features/ruby_api/api.feature +4 -3
  25. data/features/samples.feature +21 -20
  26. data/features/step_definitions/.rubocop.yml +5 -0
  27. data/features/step_definitions/reek_steps.rb +16 -28
  28. data/features/step_definitions/sample_file_steps.rb +158 -0
  29. data/features/support/env.rb +16 -27
  30. data/lib/reek.rb +3 -3
  31. data/lib/reek/cli/application.rb +4 -4
  32. data/lib/reek/cli/command.rb +1 -1
  33. data/lib/reek/cli/input.rb +2 -4
  34. data/lib/reek/cli/option_interpreter.rb +9 -9
  35. data/lib/reek/cli/options.rb +5 -4
  36. data/lib/reek/cli/reek_command.rb +3 -3
  37. data/lib/reek/cli/report/formatter.rb +2 -2
  38. data/lib/reek/cli/report/heading_formatter.rb +1 -1
  39. data/lib/reek/cli/report/location_formatter.rb +1 -1
  40. data/lib/reek/cli/report/report.rb +4 -4
  41. data/lib/reek/configuration/app_configuration.rb +1 -1
  42. data/lib/reek/configuration/configuration_file_finder.rb +17 -32
  43. data/lib/reek/core/code_context.rb +1 -1
  44. data/lib/reek/core/method_context.rb +6 -2
  45. data/lib/reek/core/module_context.rb +2 -2
  46. data/lib/reek/core/singleton_method_context.rb +1 -1
  47. data/lib/reek/core/smell_repository.rb +3 -2
  48. data/lib/reek/core/tree_walker.rb +4 -4
  49. data/lib/reek/examiner.rb +4 -4
  50. data/lib/reek/smells/attribute.rb +3 -3
  51. data/lib/reek/smells/boolean_parameter.rb +2 -2
  52. data/lib/reek/smells/class_variable.rb +2 -2
  53. data/lib/reek/smells/control_parameter.rb +2 -2
  54. data/lib/reek/smells/data_clump.rb +2 -3
  55. data/lib/reek/smells/duplicate_method_call.rb +2 -2
  56. data/lib/reek/smells/feature_envy.rb +6 -2
  57. data/lib/reek/smells/irresponsible_module.rb +3 -3
  58. data/lib/reek/smells/long_parameter_list.rb +3 -3
  59. data/lib/reek/smells/long_yield_list.rb +2 -2
  60. data/lib/reek/smells/module_initialize.rb +2 -2
  61. data/lib/reek/smells/nested_iterators.rb +2 -2
  62. data/lib/reek/smells/nil_check.rb +2 -2
  63. data/lib/reek/smells/prima_donna_method.rb +2 -2
  64. data/lib/reek/smells/repeated_conditional.rb +3 -2
  65. data/lib/reek/smells/smell_detector.rb +2 -2
  66. data/lib/reek/smells/too_many_instance_variables.rb +2 -2
  67. data/lib/reek/smells/too_many_methods.rb +2 -2
  68. data/lib/reek/smells/too_many_statements.rb +2 -2
  69. data/lib/reek/smells/uncommunicative_method_name.rb +2 -2
  70. data/lib/reek/smells/uncommunicative_module_name.rb +2 -2
  71. data/lib/reek/smells/uncommunicative_parameter_name.rb +2 -2
  72. data/lib/reek/smells/uncommunicative_variable_name.rb +2 -2
  73. data/lib/reek/smells/unused_parameters.rb +2 -2
  74. data/lib/reek/smells/utility_function.rb +8 -9
  75. data/lib/reek/source/ast_node.rb +1 -1
  76. data/lib/reek/source/ast_node_class_map.rb +6 -6
  77. data/lib/reek/source/sexp_extensions.rb +11 -2
  78. data/lib/reek/source/source_code.rb +10 -2
  79. data/lib/reek/source/source_locator.rb +1 -3
  80. data/lib/reek/source/source_repository.rb +3 -4
  81. data/lib/reek/source/tree_dresser.rb +2 -2
  82. data/lib/reek/spec.rb +3 -3
  83. data/lib/reek/spec/should_reek.rb +3 -3
  84. data/lib/reek/spec/should_reek_of.rb +1 -1
  85. data/lib/reek/spec/should_reek_only_of.rb +3 -3
  86. data/lib/reek/version.rb +1 -1
  87. data/reek.gemspec +18 -24
  88. data/spec/factories/factories.rb +1 -1
  89. data/spec/gem/updates_spec.rb +1 -1
  90. data/spec/gem/yard_spec.rb +1 -1
  91. data/spec/quality/reek_source_spec.rb +1 -1
  92. data/spec/reek/cli/html_report_spec.rb +6 -9
  93. data/spec/reek/cli/json_report_spec.rb +6 -6
  94. data/spec/reek/cli/option_interperter_spec.rb +5 -5
  95. data/spec/reek/cli/text_report_spec.rb +16 -19
  96. data/spec/reek/cli/yaml_report_spec.rb +7 -10
  97. data/spec/reek/configuration/app_configuration_spec.rb +23 -25
  98. data/spec/reek/configuration/configuration_file_finder_spec.rb +46 -21
  99. data/spec/reek/core/code_context_spec.rb +17 -19
  100. data/spec/reek/core/method_context_spec.rb +15 -14
  101. data/spec/reek/core/module_context_spec.rb +5 -7
  102. data/spec/reek/core/object_refs_spec.rb +4 -6
  103. data/spec/reek/core/singleton_method_context_spec.rb +5 -7
  104. data/spec/reek/core/smell_configuration_spec.rb +5 -7
  105. data/spec/reek/core/smell_repository_spec.rb +8 -8
  106. data/spec/reek/core/stop_context_spec.rb +4 -7
  107. data/spec/reek/core/tree_walker_spec.rb +5 -7
  108. data/spec/reek/core/warning_collector_spec.rb +5 -7
  109. data/spec/reek/examiner_spec.rb +10 -12
  110. data/spec/reek/smell_warning_spec.rb +7 -9
  111. data/spec/reek/smells/attribute_spec.rb +6 -6
  112. data/spec/reek/smells/boolean_parameter_spec.rb +4 -4
  113. data/spec/reek/smells/class_variable_spec.rb +6 -6
  114. data/spec/reek/smells/control_parameter_spec.rb +4 -4
  115. data/spec/reek/smells/data_clump_spec.rb +4 -4
  116. data/spec/reek/smells/duplicate_method_call_spec.rb +6 -6
  117. data/spec/reek/smells/feature_envy_spec.rb +9 -10
  118. data/spec/reek/smells/irresponsible_module_spec.rb +7 -7
  119. data/spec/reek/smells/long_parameter_list_spec.rb +5 -5
  120. data/spec/reek/smells/long_yield_list_spec.rb +5 -5
  121. data/spec/reek/smells/module_initialize_spec.rb +3 -3
  122. data/spec/reek/smells/nested_iterators_spec.rb +4 -4
  123. data/spec/reek/smells/nil_check_spec.rb +5 -5
  124. data/spec/reek/smells/prima_donna_method_spec.rb +7 -4
  125. data/spec/reek/smells/repeated_conditional_spec.rb +12 -11
  126. data/spec/reek/smells/smell_detector_shared.rb +4 -5
  127. data/spec/reek/smells/too_many_instance_variables_spec.rb +4 -4
  128. data/spec/reek/smells/too_many_methods_spec.rb +11 -7
  129. data/spec/reek/smells/too_many_statements_spec.rb +6 -5
  130. data/spec/reek/smells/uncommunicative_method_name_spec.rb +4 -4
  131. data/spec/reek/smells/uncommunicative_module_name_spec.rb +7 -7
  132. data/spec/reek/smells/uncommunicative_parameter_name_spec.rb +5 -5
  133. data/spec/reek/smells/uncommunicative_variable_name_spec.rb +9 -6
  134. data/spec/reek/smells/unused_parameters_spec.rb +3 -3
  135. data/spec/reek/smells/utility_function_spec.rb +41 -37
  136. data/spec/reek/source/code_comment_spec.rb +19 -17
  137. data/spec/reek/source/object_source_spec.rb +1 -3
  138. data/spec/reek/source/reference_collector_spec.rb +5 -6
  139. data/spec/reek/source/sexp_extensions_spec.rb +9 -11
  140. data/spec/reek/source/sexp_formatter_spec.rb +7 -8
  141. data/spec/reek/source/sexp_node_spec.rb +3 -5
  142. data/spec/reek/source/source_code_spec.rb +9 -9
  143. data/spec/reek/source/tree_dresser_spec.rb +4 -6
  144. data/spec/reek/spec/should_reek_of_spec.rb +11 -10
  145. data/spec/reek/spec/should_reek_only_of_spec.rb +4 -7
  146. data/spec/reek/spec/should_reek_spec.rb +4 -7
  147. data/spec/samples/{overrides/masked/lower.reek → masked_by_dotfile/.reek} +3 -1
  148. data/spec/spec_helper.rb +4 -4
  149. data/tasks/develop.rake +1 -1
  150. data/tasks/reek.rake +1 -1
  151. metadata +72 -86
  152. data/features/support/hooks.rb +0 -15
  153. data/lib/reek/source.rb +0 -16
  154. data/lib/reek/source/core_extras.rb +0 -46
  155. data/lib/reek/source/source_file.rb +0 -16
  156. data/spec/samples/config/allow_duplication.reek +0 -3
  157. data/spec/samples/config/deeper_nested_iterators.reek +0 -3
  158. data/spec/samples/configuration_loading/minimal_dirty.rb +0 -4
  159. data/spec/samples/configuration_loading/reek-test-run-disable_smells.reek +0 -7
  160. data/spec/samples/configuration_loading/reek-test-run-enable_smells.reek +0 -7
  161. data/spec/samples/corrupt_config_file/corrupt.reek +0 -1
  162. data/spec/samples/corrupt_config_file/dirty.rb +0 -8
  163. data/spec/samples/demo/demo.rb +0 -8
  164. data/spec/samples/empty_config_file/dirty.rb +0 -8
  165. data/spec/samples/empty_config_file/empty.reek +0 -0
  166. data/spec/samples/inline_config/dirty.rb +0 -16
  167. data/spec/samples/inline_config/masked.reek +0 -7
  168. data/spec/samples/mask_some/dirty.rb +0 -8
  169. data/spec/samples/mask_some/some.reek +0 -8
  170. data/spec/samples/masked/dirty.rb +0 -8
  171. data/spec/samples/masked/masked.reek +0 -5
  172. data/spec/samples/minimal_smelly_and_masked/config.reek +0 -7
  173. data/spec/samples/minimal_smelly_and_masked/minimal_dirty.rb +0 -4
  174. data/spec/samples/mixed_results/clean_one.rb +0 -7
  175. data/spec/samples/mixed_results/clean_three.rb +0 -7
  176. data/spec/samples/mixed_results/clean_two.rb +0 -7
  177. data/spec/samples/mixed_results/dirty_one.rb +0 -8
  178. data/spec/samples/mixed_results/dirty_two.rb +0 -8
  179. data/spec/samples/not_quite_masked/dirty.rb +0 -8
  180. data/spec/samples/not_quite_masked/masked.reek +0 -5
  181. data/spec/samples/not_quite_masked/smelly.rb +0 -3
  182. data/spec/samples/one_smelly_file/dirty.rb +0 -3
  183. data/spec/samples/overrides/masked/dirty.rb +0 -8
  184. data/spec/samples/overrides/upper.reek +0 -5
  185. data/spec/samples/overrides_defaults/camel_case.rb +0 -14
  186. data/spec/samples/overrides_defaults/config.reek +0 -6
  187. data/spec/samples/standard_smelly/dirty.rb +0 -8
  188. data/spec/samples/standard_smelly/minimal_dirty.rb +0 -4
  189. data/spec/samples/three_smelly_files/dirty_one.rb +0 -3
  190. data/spec/samples/three_smelly_files/dirty_three.rb +0 -5
  191. data/spec/samples/three_smelly_files/dirty_two.rb +0 -4
@@ -1,8 +1,6 @@
1
- require 'English'
2
- require 'tempfile'
3
- require 'fileutils'
4
- require 'open3'
5
- require 'reek/cli/application'
1
+ require_relative '../../lib/reek/cli/application'
2
+ require 'aruba/cucumber'
3
+ require 'active_support/core_ext/string/strip'
6
4
 
7
5
  begin
8
6
  require 'pry-byebug'
@@ -13,39 +11,30 @@ end
13
11
  # Provides runner methods used in the cucumber steps.
14
12
  #
15
13
  class ReekWorld
16
- def run(cmd)
17
- stderr_file = Tempfile.new('reek-world')
18
- stderr_file.close
19
- @last_stdout = `#{cmd} 2> #{stderr_file.path}`
20
- @last_exit_status = $CHILD_STATUS.exitstatus
21
- @last_stderr = IO.read(stderr_file.path)
22
- end
23
-
24
14
  def reek(args)
25
- run("ruby -Ilib bin/reek --no-color #{args}")
15
+ run_simple("reek --no-color #{args}", false)
26
16
  end
27
17
 
28
18
  def reek_with_pipe(stdin, args)
29
- run("echo \"#{stdin}\" | ruby -Ilib bin/reek --no-color #{args}")
19
+ run_interactive("reek --no-color #{args}")
20
+ type(stdin)
21
+ close_input
30
22
  end
31
23
 
32
24
  def rake(name, task_def)
33
- header = <<EOS
34
- $:.unshift('lib')
35
- require 'reek/rake/task'
25
+ header = <<-EOS.strip_heredoc
26
+ require 'reek/rake/task'
36
27
 
37
- EOS
38
- rakefile = Tempfile.new('rake_task', '.')
39
- rakefile.puts(header + task_def)
40
- rakefile.close
41
- run("rake -f #{rakefile.path} #{name}")
42
- lines = @last_stdout.split("\n")
43
- if lines.length > 0 && lines[0] =~ /^\(/
44
- @last_stdout = lines[1..-1].join("\n")
45
- end
28
+ EOS
29
+ write_file 'Rakefile', header + task_def
30
+ run_simple("rake #{name}", false)
46
31
  end
47
32
  end
48
33
 
49
34
  World do
50
35
  ReekWorld.new
51
36
  end
37
+
38
+ Before do
39
+ @aruba_timeout_seconds = 30
40
+ end
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Reek's core functionality
3
3
  #
4
- require 'reek/version'
5
- require 'reek/examiner'
6
- require 'reek/smell_warning'
4
+ require_relative 'reek/version'
5
+ require_relative 'reek/examiner'
6
+ require_relative 'reek/smell_warning'
@@ -1,9 +1,9 @@
1
- require 'reek/cli/options'
2
- require 'reek/cli/reek_command'
3
- require 'reek/configuration/app_configuration'
1
+ require_relative 'options'
2
+ require_relative 'reek_command'
3
+ require_relative '../configuration/app_configuration'
4
4
 
5
5
  module Reek
6
- module Cli
6
+ module CLI
7
7
  #
8
8
  # Represents an instance of a Reek application.
9
9
  # This is the entry point for all invocations of Reek from the
@@ -1,5 +1,5 @@
1
1
  module Reek
2
- module Cli
2
+ module CLI
3
3
  #
4
4
  # Base class for all commands
5
5
  #
@@ -1,7 +1,5 @@
1
- require 'reek/source'
2
-
3
1
  module Reek
4
- module Cli
2
+ module CLI
5
3
  #
6
4
  # CLI Input utility
7
5
  #
@@ -39,7 +37,7 @@ module Reek
39
37
  end
40
38
 
41
39
  def source_from_pipe
42
- [$stdin.to_reek_source('$stdin')]
40
+ [Source::SourceCode.from($stdin)]
43
41
  end
44
42
  end
45
43
  end
@@ -1,16 +1,16 @@
1
1
  require 'forwardable'
2
- require 'reek/cli/input'
3
- require 'reek/cli/report/report'
4
- require 'reek/cli/report/formatter'
5
- require 'reek/cli/report/heading_formatter'
2
+ require_relative 'input'
3
+ require_relative 'report/report'
4
+ require_relative 'report/formatter'
5
+ require_relative 'report/heading_formatter'
6
6
 
7
7
  module Reek
8
- module Cli
8
+ module CLI
9
9
  #
10
10
  # Interprets the options set from the command line
11
11
  #
12
12
  class OptionInterpreter
13
- include Cli::Input
13
+ include CLI::Input
14
14
 
15
15
  extend Forwardable
16
16
 
@@ -33,11 +33,11 @@ module Reek
33
33
  def report_class
34
34
  case @options.report_format
35
35
  when :yaml
36
- Report::YamlReport
36
+ Report::YAMLReport
37
37
  when :json
38
- Report::JsonReport
38
+ Report::JSONReport
39
39
  when :html
40
- Report::HtmlReport
40
+ Report::HTMLReport
41
41
  else # :text
42
42
  Report::TextReport
43
43
  end
@@ -1,11 +1,11 @@
1
1
  require 'optparse'
2
2
  require 'ostruct'
3
3
  require 'rainbow'
4
- require 'reek/cli/option_interpreter'
5
- require 'reek/version'
4
+ require_relative 'option_interpreter'
5
+ require_relative '../version'
6
6
 
7
7
  module Reek
8
- module Cli
8
+ module CLI
9
9
  #
10
10
  # Parses the command line
11
11
  #
@@ -64,7 +64,8 @@ module Reek
64
64
  def set_configuration_options
65
65
  @parser.separator 'Configuration:'
66
66
  @parser.on('-c', '--config FILE', 'Read configuration options from FILE') do |file|
67
- @options.config_file = file
67
+ raise ArgumentError, "Config file #{file} doesn't exist" unless File.exist?(file)
68
+ @options.config_file = Pathname.new(file)
68
69
  end
69
70
  @parser.on('--smell SMELL', 'Detect smell SMELL (default: all enabled smells)') do |smell|
70
71
  @options.smells_to_detect << smell
@@ -1,8 +1,8 @@
1
- require 'reek/cli/command'
2
- require 'reek/examiner'
1
+ require_relative 'command'
2
+ require_relative '../examiner'
3
3
 
4
4
  module Reek
5
- module Cli
5
+ module CLI
6
6
  #
7
7
  # A command to collect smells from a set of sources and write them out in
8
8
  # text report format.
@@ -1,7 +1,7 @@
1
- require 'reek/cli/report/location_formatter'
1
+ require_relative 'location_formatter'
2
2
 
3
3
  module Reek
4
- module Cli
4
+ module CLI
5
5
  module Report
6
6
  #
7
7
  # Formatter handling the formatting of the report at large.
@@ -1,5 +1,5 @@
1
1
  module Reek
2
- module Cli
2
+ module CLI
3
3
  module Report
4
4
  module HeadingFormatter
5
5
  #
@@ -1,5 +1,5 @@
1
1
  module Reek
2
- module Cli
2
+ module CLI
3
3
  module Report
4
4
  #
5
5
  # Formats the location of a warning as an empty string.
@@ -2,7 +2,7 @@ require 'rainbow'
2
2
  require 'json'
3
3
 
4
4
  module Reek
5
- module Cli
5
+ module CLI
6
6
  module Report
7
7
  #
8
8
  # A report that contains the smells and smell counts following source code analysis.
@@ -92,7 +92,7 @@ module Reek
92
92
  #
93
93
  # Displays a list of smells in YAML format
94
94
  # YAML with empty array for 0 smells
95
- class YamlReport < Base
95
+ class YAMLReport < Base
96
96
  def show
97
97
  print smells.map(&:yaml_hash).to_yaml
98
98
  end
@@ -101,7 +101,7 @@ module Reek
101
101
  #
102
102
  # Displays a list of smells in JSON format
103
103
  # JSON with empty array for 0 smells
104
- class JsonReport < Base
104
+ class JSONReport < Base
105
105
  def show
106
106
  print ::JSON.generate(
107
107
  smells.map do |smell|
@@ -114,7 +114,7 @@ module Reek
114
114
  #
115
115
  # Saves the report as a HTML file
116
116
  #
117
- class HtmlReport < Base
117
+ class HTMLReport < Base
118
118
  require 'erb'
119
119
 
120
120
  def show
@@ -15,7 +15,7 @@ module Reek
15
15
 
16
16
  def initialize_with(options)
17
17
  @has_been_initialized = true
18
- configuration_file_path = ConfigurationFileFinder.find(options)
18
+ configuration_file_path = ConfigurationFileFinder.find(options: options)
19
19
  return unless configuration_file_path
20
20
  load_from_file configuration_file_path
21
21
  end
@@ -14,41 +14,26 @@ module Reek
14
14
  # The order in which ConfigurationFileFinder tries to find such a
15
15
  # configuration file is exactly like above.
16
16
  module ConfigurationFileFinder
17
- class << self
18
- def find(options)
19
- configuration_by_cli(options) ||
20
- configuration_in_file_system ||
21
- configuration_in_home_directory
22
- end
23
-
24
- private
25
-
26
- def configuration_by_cli(options)
27
- return unless options # Return gracefully allowing calls without app context
28
- config_file_option = options.config_file
29
- return unless config_file_option
30
- path_name = Pathname.new config_file_option
31
- raise ArgumentError, "Config file #{path_name} doesn't exist" unless path_name.exist?
32
- path_name
33
- end
34
-
35
- def configuration_in_file_system
36
- detect_or_traverse_up Pathname.pwd
37
- end
17
+ module_function
38
18
 
39
- def configuration_in_home_directory
40
- detect_configuration_in_directory Pathname.new(Dir.home)
41
- end
19
+ # FIXME: switch to kwargs on upgrade to Ruby 2 and drop `params.fetch` calls:
20
+ # def find(options: nil, current: Pathname.pwd, home: Pathname.new(Dir.home))
21
+ def find(params = {})
22
+ options = params.fetch(:options) { nil }
23
+ current = params.fetch(:current) { Pathname.pwd }
24
+ home = params.fetch(:home) { Pathname.new(Dir.home) }
25
+ find_by_cli(options) || find_by_dir(current) || find_by_dir(home)
26
+ end
42
27
 
43
- def detect_or_traverse_up(directory)
44
- file = detect_configuration_in_directory(directory)
45
- return file unless file.nil?
46
- return if directory.root?
47
- detect_or_traverse_up directory.parent
48
- end
28
+ def find_by_cli(options)
29
+ options && options.config_file
30
+ end
49
31
 
50
- def detect_configuration_in_directory(directory)
51
- directory.children.select(&:file?).find { |path| path.to_s.end_with?('.reek') }
32
+ def find_by_dir(start)
33
+ start.ascend do |dir|
34
+ files = dir.children.select(&:file?).sort
35
+ found = files.find { |file| file.to_s.end_with?('.reek') }
36
+ return found if found
52
37
  end
53
38
  end
54
39
  end
@@ -13,7 +13,7 @@ module Reek
13
13
  # Initializes a new CodeContext.
14
14
  #
15
15
  # context - *_context from the `core` namespace
16
- # exp - Reek::Source::AstNode
16
+ # exp - Reek::Source::ASTNode
17
17
  #
18
18
  # Examples:
19
19
  #
@@ -1,5 +1,5 @@
1
- require 'reek/core/code_context'
2
- require 'reek/core/object_refs'
1
+ require_relative 'code_context'
2
+ require_relative 'object_refs'
3
3
 
4
4
  module Reek
5
5
  module Core
@@ -58,6 +58,10 @@ module Reek
58
58
  @refs.max_keys
59
59
  end
60
60
 
61
+ def references_self?
62
+ exp.depends_on_instance?
63
+ end
64
+
61
65
  def uses_param?(param)
62
66
  local_nodes(:lvar).find { |node| node.var_name == param.to_sym }
63
67
  end
@@ -1,5 +1,5 @@
1
- require 'reek/core/code_context'
2
- require 'reek/source/sexp_formatter'
1
+ require_relative 'code_context'
2
+ require_relative '../source/sexp_formatter'
3
3
 
4
4
  module Reek
5
5
  module Core
@@ -1,4 +1,4 @@
1
- require 'reek/core/method_context'
1
+ require_relative 'method_context'
2
2
 
3
3
  module Reek
4
4
  module Core
@@ -1,5 +1,6 @@
1
- require 'reek/smells'
2
- require 'reek/smells/smell_detector'
1
+ require_relative '../smells'
2
+ require_relative '../smells/smell_detector'
3
+ require_relative '../configuration/app_configuration'
3
4
 
4
5
  module Reek
5
6
  module Core
@@ -1,7 +1,7 @@
1
- require 'reek/core/method_context'
2
- require 'reek/core/module_context'
3
- require 'reek/core/stop_context'
4
- require 'reek/core/singleton_method_context'
1
+ require_relative 'method_context'
2
+ require_relative 'module_context'
3
+ require_relative 'stop_context'
4
+ require_relative 'singleton_method_context'
5
5
 
6
6
  module Reek
7
7
  module Core
@@ -1,7 +1,7 @@
1
- require 'reek/source/source_repository'
2
- require 'reek/core/warning_collector'
3
- require 'reek/core/smell_repository'
4
- require 'reek/core/tree_walker'
1
+ require_relative 'source/source_repository'
2
+ require_relative 'core/warning_collector'
3
+ require_relative 'core/smell_repository'
4
+ require_relative 'core/tree_walker'
5
5
 
6
6
  module Reek
7
7
  #
@@ -1,6 +1,6 @@
1
- require 'reek/smells/smell_detector'
2
- require 'reek/smell_warning'
3
- require 'reek/core/smell_configuration'
1
+ require_relative 'smell_detector'
2
+ require_relative '../smell_warning'
3
+ require_relative '../core/smell_configuration'
4
4
 
5
5
  module Reek
6
6
  module Smells
@@ -1,5 +1,5 @@
1
- require 'reek/smells/smell_detector'
2
- require 'reek/smell_warning'
1
+ require_relative 'smell_detector'
2
+ require_relative '../smell_warning'
3
3
 
4
4
  module Reek
5
5
  module Smells
@@ -1,6 +1,6 @@
1
1
  require 'set'
2
- require 'reek/smells/smell_detector'
3
- require 'reek/smell_warning'
2
+ require_relative 'smell_detector'
3
+ require_relative '../smell_warning'
4
4
 
5
5
  module Reek
6
6
  module Smells
@@ -1,5 +1,5 @@
1
- require 'reek/smells/smell_detector'
2
- require 'reek/smell_warning'
1
+ require_relative 'smell_detector'
2
+ require_relative '../smell_warning'
3
3
 
4
4
  module Reek
5
5
  module Smells
@@ -1,6 +1,5 @@
1
- require 'reek/smells/smell_detector'
2
- require 'reek/smell_warning'
3
- require 'reek/source'
1
+ require_relative 'smell_detector'
2
+ require_relative '../smell_warning'
4
3
 
5
4
  module Reek
6
5
  module Smells