From 42ede1e01b20352520c5d12f1f8bd6b951a7bfc8 Mon Sep 17 00:00:00 2001 From: Matijs van Zuijlen Date: Mon, 17 Feb 2025 07:23:00 +0100 Subject: [PATCH] Handle frozen source code string literals This change is needed to stop Ruby 3.4 emitting warnings about string literals being frozen in the future. --- .rubocop.yml | 7 ------- .simplecov | 2 ++ Gemfile | 2 ++ Rakefile | 2 ++ docs/templates/default/docstring/setup.rb | 2 ++ docs/yard_plugin.rb | 2 ++ features/step_definitions/reek_steps.rb | 2 ++ features/step_definitions/sample_file_steps.rb | 2 ++ features/support/env.rb | 2 ++ lib/reek/source/source_code.rb | 16 +++++++++++----- reek.gemspec | 2 ++ .../reek/smell_detectors/runtime_speed_spec.rb | 2 ++ spec/quality/documentation_spec.rb | 2 ++ spec/quality/reek_source_spec.rb | 2 ++ spec/reek/ast/node_spec.rb | 2 ++ spec/reek/ast/object_refs_spec.rb | 2 ++ spec/reek/ast/reference_collector_spec.rb | 2 ++ spec/reek/ast/sexp_extensions_spec.rb | 2 ++ spec/reek/cli/application_spec.rb | 2 ++ spec/reek/cli/command/report_command_spec.rb | 2 ++ spec/reek/cli/command/todo_list_command_spec.rb | 2 ++ spec/reek/cli/options_spec.rb | 2 ++ spec/reek/cli/silencer_spec.rb | 2 ++ .../code_climate_configuration_spec.rb | 2 ++ .../code_climate_fingerprint_spec.rb | 2 ++ .../code_climate/code_climate_formatter_spec.rb | 2 ++ .../code_climate/code_climate_report_spec.rb | 2 ++ spec/reek/code_comment_spec.rb | 2 ++ .../reek/configuration/app_configuration_spec.rb | 2 ++ .../configuration_file_finder_spec.rb | 2 ++ .../reek/configuration/default_directive_spec.rb | 2 ++ .../configuration/directory_directives_spec.rb | 2 ++ spec/reek/configuration/excluded_paths_spec.rb | 2 ++ .../configuration/rake_task_converter_spec.rb | 2 ++ spec/reek/configuration/schema_spec.rb | 2 ++ spec/reek/configuration/schema_validator_spec.rb | 2 ++ spec/reek/context/code_context_spec.rb | 2 ++ spec/reek/context/ghost_context_spec.rb | 2 ++ spec/reek/context/method_context_spec.rb | 2 ++ spec/reek/context/module_context_spec.rb | 2 ++ spec/reek/context/root_context_spec.rb | 2 ++ spec/reek/context/statement_counter_spec.rb | 2 ++ spec/reek/context_builder_spec.rb | 2 ++ spec/reek/detector_repository_spec.rb | 2 ++ spec/reek/documentation_link_spec.rb | 2 ++ spec/reek/errors/base_error_spec.rb | 2 ++ spec/reek/examiner_spec.rb | 2 ++ spec/reek/logging_error_handler_spec.rb | 2 ++ spec/reek/rake/task_spec.rb | 2 ++ spec/reek/report/github_report_spec.rb | 2 ++ spec/reek/report/html_report_spec.rb | 2 ++ spec/reek/report/json_report_spec.rb | 2 ++ spec/reek/report/location_formatter_spec.rb | 2 ++ spec/reek/report/progress_formatter_spec.rb | 2 ++ spec/reek/report/text_report_spec.rb | 2 ++ spec/reek/report/xml_report_spec.rb | 2 ++ spec/reek/report/yaml_report_spec.rb | 2 ++ spec/reek/report_spec.rb | 2 ++ spec/reek/smell_configuration_spec.rb | 2 ++ spec/reek/smell_detectors/attribute_spec.rb | 2 ++ spec/reek/smell_detectors/base_detector_spec.rb | 2 ++ .../smell_detectors/boolean_parameter_spec.rb | 2 ++ spec/reek/smell_detectors/class_variable_spec.rb | 2 ++ .../smell_detectors/control_parameter_spec.rb | 2 ++ spec/reek/smell_detectors/data_clump_spec.rb | 2 ++ .../duplicate_method_call_spec.rb | 2 ++ spec/reek/smell_detectors/feature_envy_spec.rb | 2 ++ .../instance_variable_assumption_spec.rb | 2 ++ .../smell_detectors/irresponsible_module_spec.rb | 2 ++ .../smell_detectors/long_parameter_list_spec.rb | 2 ++ .../reek/smell_detectors/long_yield_list_spec.rb | 2 ++ .../reek/smell_detectors/manual_dispatch_spec.rb | 2 ++ .../smell_detectors/missing_safe_method_spec.rb | 2 ++ .../smell_detectors/module_initialize_spec.rb | 2 ++ .../smell_detectors/nested_iterators_spec.rb | 2 ++ spec/reek/smell_detectors/nil_check_spec.rb | 2 ++ .../smell_detectors/repeated_conditional_spec.rb | 2 ++ .../subclassed_from_core_class_spec.rb | 2 ++ .../smell_detectors/too_many_constants_spec.rb | 2 ++ .../too_many_instance_variables_spec.rb | 2 ++ .../smell_detectors/too_many_methods_spec.rb | 2 ++ .../smell_detectors/too_many_statements_spec.rb | 2 ++ .../uncommunicative_method_name_spec.rb | 2 ++ .../uncommunicative_module_name_spec.rb | 2 ++ .../uncommunicative_parameter_name_spec.rb | 2 ++ .../uncommunicative_variable_name_spec.rb | 2 ++ .../smell_detectors/unused_parameters_spec.rb | 2 ++ .../unused_private_method_spec.rb | 2 ++ .../smell_detectors/utility_function_spec.rb | 2 ++ spec/reek/smell_warning_spec.rb | 2 ++ spec/reek/source/source_code_spec.rb | 2 ++ spec/reek/source/source_locator_spec.rb | 2 ++ spec/reek/spec/should_reek_of_spec.rb | 2 ++ spec/reek/spec/should_reek_only_of_spec.rb | 2 ++ spec/reek/spec/should_reek_spec.rb | 2 ++ spec/reek/spec/smell_matcher_spec.rb | 2 ++ spec/reek/tree_dresser_spec.rb | 2 ++ spec/spec_helper.rb | 2 ++ tasks/configuration.rake | 2 ++ tasks/console.rake | 2 ++ tasks/reek.rake | 2 ++ tasks/rubocop.rake | 2 ++ tasks/test.rake | 2 ++ 103 files changed, 213 insertions(+), 12 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index ce648e4ed..203467727 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -84,13 +84,6 @@ RSpec/ExampleLength: Style/AndOr: EnforcedStyle: conditionals -# Require comment for files in lib and bin -Style/FrozenStringLiteralComment: - Include: - - 'bin/*' - - 'lib/**/*' - EnforcedStyle: always - # Allow multiline block chains Style/MultilineBlockChain: Enabled: false diff --git a/.simplecov b/.simplecov index f8295d3f0..70e29a19d 100644 --- a/.simplecov +++ b/.simplecov @@ -1,3 +1,5 @@ +# frozen_string_literal: true + SimpleCov.start do track_files 'lib/**/*.rb' add_filter 'lib/reek/version.rb' # version.rb is loaded too early to test diff --git a/Gemfile b/Gemfile index ba3da6611..82d9b8f90 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source 'https://rubygems.org' gemspec diff --git a/Rakefile b/Rakefile index 790085add..09bd0b6c3 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'bundler/gem_tasks' require 'rake/clean' diff --git a/docs/templates/default/docstring/setup.rb b/docs/templates/default/docstring/setup.rb index bb43f2d58..230f62d60 100644 --- a/docs/templates/default/docstring/setup.rb +++ b/docs/templates/default/docstring/setup.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + def init super return unless show_api_marker_section? diff --git a/docs/yard_plugin.rb b/docs/yard_plugin.rb index 53d891591..585da99d1 100644 --- a/docs/yard_plugin.rb +++ b/docs/yard_plugin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'yard' # Template helper to modify processing of links in HTML generated from our diff --git a/features/step_definitions/reek_steps.rb b/features/step_definitions/reek_steps.rb index ba8a66dde..847533f22 100644 --- a/features/step_definitions/reek_steps.rb +++ b/features/step_definitions/reek_steps.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + When /^I run reek (.*)$/ do |args| reek(args) end diff --git a/features/step_definitions/sample_file_steps.rb b/features/step_definitions/sample_file_steps.rb index 9fe9d313f..742f4c80c 100644 --- a/features/step_definitions/sample_file_steps.rb +++ b/features/step_definitions/sample_file_steps.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../samples/paths' Given(/^the smelly file '(.+)'$/) do |filename| diff --git a/features/support/env.rb b/features/support/env.rb index 5a43718be..611272844 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../lib/reek' require_relative '../../lib/reek/cli/application' require 'aruba/cucumber' diff --git a/lib/reek/source/source_code.rb b/lib/reek/source/source_code.rb index 892034f01..8191080d6 100644 --- a/lib/reek/source/source_code.rb +++ b/lib/reek/source/source_code.rb @@ -75,11 +75,17 @@ def origin def code @code ||= - case source - when File, Pathname then source.read - when IO then source.readlines.join - when String then source - end.force_encoding(Encoding::UTF_8) + begin + str = + case source + when File, Pathname then source.read + when IO then source.readlines.join + when String then source + end + + str = str.dup if str.frozen? + str.force_encoding(Encoding::UTF_8) + end end attr_reader :parser, :source diff --git a/reek.gemspec b/reek.gemspec index 2a80fecaa..aabd4983d 100644 --- a/reek.gemspec +++ b/reek.gemspec @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative 'lib/reek/version' Gem::Specification.new do |spec| diff --git a/spec/performance/reek/smell_detectors/runtime_speed_spec.rb b/spec/performance/reek/smell_detectors/runtime_speed_spec.rb index cd8eab60e..c16f18644 100644 --- a/spec/performance/reek/smell_detectors/runtime_speed_spec.rb +++ b/spec/performance/reek/smell_detectors/runtime_speed_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../../spec_helper' require_lib 'reek/examiner' diff --git a/spec/quality/documentation_spec.rb b/spec/quality/documentation_spec.rb index 9c50046b3..77330f33b 100644 --- a/spec/quality/documentation_spec.rb +++ b/spec/quality/documentation_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../spec_helper' require 'kramdown' diff --git a/spec/quality/reek_source_spec.rb b/spec/quality/reek_source_spec.rb index 4216239f3..7d575e357 100644 --- a/spec/quality/reek_source_spec.rb +++ b/spec/quality/reek_source_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../spec_helper' RSpec.describe 'Reek source code' do diff --git a/spec/reek/ast/node_spec.rb b/spec/reek/ast/node_spec.rb index 3e717099a..5646b7232 100644 --- a/spec/reek/ast/node_spec.rb +++ b/spec/reek/ast/node_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/ast/node' diff --git a/spec/reek/ast/object_refs_spec.rb b/spec/reek/ast/object_refs_spec.rb index 7a070f070..57796e41a 100644 --- a/spec/reek/ast/object_refs_spec.rb +++ b/spec/reek/ast/object_refs_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/ast/object_refs' diff --git a/spec/reek/ast/reference_collector_spec.rb b/spec/reek/ast/reference_collector_spec.rb index 7f6e9a41b..d9b4519da 100644 --- a/spec/reek/ast/reference_collector_spec.rb +++ b/spec/reek/ast/reference_collector_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/ast/reference_collector' diff --git a/spec/reek/ast/sexp_extensions_spec.rb b/spec/reek/ast/sexp_extensions_spec.rb index 76a80d682..a79a33d21 100644 --- a/spec/reek/ast/sexp_extensions_spec.rb +++ b/spec/reek/ast/sexp_extensions_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/ast/sexp_extensions' diff --git a/spec/reek/cli/application_spec.rb b/spec/reek/cli/application_spec.rb index 9f10624c9..61c07c779 100644 --- a/spec/reek/cli/application_spec.rb +++ b/spec/reek/cli/application_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/cli/application' diff --git a/spec/reek/cli/command/report_command_spec.rb b/spec/reek/cli/command/report_command_spec.rb index 3cc91a5cb..1db1f5a98 100644 --- a/spec/reek/cli/command/report_command_spec.rb +++ b/spec/reek/cli/command/report_command_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../../spec_helper' require_lib 'reek/cli/command/report_command' require_lib 'reek/cli/options' diff --git a/spec/reek/cli/command/todo_list_command_spec.rb b/spec/reek/cli/command/todo_list_command_spec.rb index 5911df0da..1cb8babb8 100644 --- a/spec/reek/cli/command/todo_list_command_spec.rb +++ b/spec/reek/cli/command/todo_list_command_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../../spec_helper' require_lib 'reek/cli/command/todo_list_command' require_lib 'reek/cli/options' diff --git a/spec/reek/cli/options_spec.rb b/spec/reek/cli/options_spec.rb index af4d05c9b..0818c7138 100644 --- a/spec/reek/cli/options_spec.rb +++ b/spec/reek/cli/options_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/cli/options' diff --git a/spec/reek/cli/silencer_spec.rb b/spec/reek/cli/silencer_spec.rb index e3d9dc6e8..3967eb74a 100644 --- a/spec/reek/cli/silencer_spec.rb +++ b/spec/reek/cli/silencer_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/cli/silencer' diff --git a/spec/reek/code_climate/code_climate_configuration_spec.rb b/spec/reek/code_climate/code_climate_configuration_spec.rb index 16a601f5f..07a855ee9 100644 --- a/spec/reek/code_climate/code_climate_configuration_spec.rb +++ b/spec/reek/code_climate/code_climate_configuration_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/code_climate/code_climate_configuration' diff --git a/spec/reek/code_climate/code_climate_fingerprint_spec.rb b/spec/reek/code_climate/code_climate_fingerprint_spec.rb index 7abcd62be..89176790e 100644 --- a/spec/reek/code_climate/code_climate_fingerprint_spec.rb +++ b/spec/reek/code_climate/code_climate_fingerprint_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/code_climate/code_climate_fingerprint' diff --git a/spec/reek/code_climate/code_climate_formatter_spec.rb b/spec/reek/code_climate/code_climate_formatter_spec.rb index 88ada02d4..26250fe5e 100644 --- a/spec/reek/code_climate/code_climate_formatter_spec.rb +++ b/spec/reek/code_climate/code_climate_formatter_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/code_climate/code_climate_formatter' diff --git a/spec/reek/code_climate/code_climate_report_spec.rb b/spec/reek/code_climate/code_climate_report_spec.rb index c0a2aa94b..501de3d77 100644 --- a/spec/reek/code_climate/code_climate_report_spec.rb +++ b/spec/reek/code_climate/code_climate_report_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/examiner' require_lib 'reek/code_climate' diff --git a/spec/reek/code_comment_spec.rb b/spec/reek/code_comment_spec.rb index 11e4164ab..3a81a73f1 100644 --- a/spec/reek/code_comment_spec.rb +++ b/spec/reek/code_comment_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../spec_helper' require_lib 'reek/code_comment' diff --git a/spec/reek/configuration/app_configuration_spec.rb b/spec/reek/configuration/app_configuration_spec.rb index 57cf7578e..fb982f361 100644 --- a/spec/reek/configuration/app_configuration_spec.rb +++ b/spec/reek/configuration/app_configuration_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'pathname' require_relative '../../spec_helper' require_lib 'reek/configuration/app_configuration' diff --git a/spec/reek/configuration/configuration_file_finder_spec.rb b/spec/reek/configuration/configuration_file_finder_spec.rb index bdfa99b33..3717b0130 100644 --- a/spec/reek/configuration/configuration_file_finder_spec.rb +++ b/spec/reek/configuration/configuration_file_finder_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'fileutils' require 'pathname' require 'tmpdir' diff --git a/spec/reek/configuration/default_directive_spec.rb b/spec/reek/configuration/default_directive_spec.rb index 8fd406f3c..7b5f51cfe 100644 --- a/spec/reek/configuration/default_directive_spec.rb +++ b/spec/reek/configuration/default_directive_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/configuration/default_directive' diff --git a/spec/reek/configuration/directory_directives_spec.rb b/spec/reek/configuration/directory_directives_spec.rb index 075ab35a9..5ff538e25 100644 --- a/spec/reek/configuration/directory_directives_spec.rb +++ b/spec/reek/configuration/directory_directives_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/errors/config_file_error' require_lib 'reek/configuration/directory_directives' diff --git a/spec/reek/configuration/excluded_paths_spec.rb b/spec/reek/configuration/excluded_paths_spec.rb index bf3b8a07e..811ceee9e 100644 --- a/spec/reek/configuration/excluded_paths_spec.rb +++ b/spec/reek/configuration/excluded_paths_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/errors/config_file_error' require_lib 'reek/configuration/excluded_paths' diff --git a/spec/reek/configuration/rake_task_converter_spec.rb b/spec/reek/configuration/rake_task_converter_spec.rb index decae0307..16927c44a 100644 --- a/spec/reek/configuration/rake_task_converter_spec.rb +++ b/spec/reek/configuration/rake_task_converter_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/configuration/rake_task_converter' diff --git a/spec/reek/configuration/schema_spec.rb b/spec/reek/configuration/schema_spec.rb index 392d76126..5b2a465cb 100644 --- a/spec/reek/configuration/schema_spec.rb +++ b/spec/reek/configuration/schema_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/configuration/schema' diff --git a/spec/reek/configuration/schema_validator_spec.rb b/spec/reek/configuration/schema_validator_spec.rb index 2d2e63e37..5eb13f526 100644 --- a/spec/reek/configuration/schema_validator_spec.rb +++ b/spec/reek/configuration/schema_validator_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/configuration/schema_validator' require_lib 'reek/errors/config_file_error' diff --git a/spec/reek/context/code_context_spec.rb b/spec/reek/context/code_context_spec.rb index c3c18a9ee..b7bb84f93 100644 --- a/spec/reek/context/code_context_spec.rb +++ b/spec/reek/context/code_context_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/context/method_context' require_lib 'reek/context/module_context' diff --git a/spec/reek/context/ghost_context_spec.rb b/spec/reek/context/ghost_context_spec.rb index f7b3a2b55..de49b7af7 100644 --- a/spec/reek/context/ghost_context_spec.rb +++ b/spec/reek/context/ghost_context_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/context/code_context' require_lib 'reek/context/ghost_context' diff --git a/spec/reek/context/method_context_spec.rb b/spec/reek/context/method_context_spec.rb index fc2ec3f07..82f94878b 100644 --- a/spec/reek/context/method_context_spec.rb +++ b/spec/reek/context/method_context_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/context/method_context' diff --git a/spec/reek/context/module_context_spec.rb b/spec/reek/context/module_context_spec.rb index f0fd42961..66462d6b3 100644 --- a/spec/reek/context/module_context_spec.rb +++ b/spec/reek/context/module_context_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/context/module_context' require_lib 'reek/context/root_context' diff --git a/spec/reek/context/root_context_spec.rb b/spec/reek/context/root_context_spec.rb index 0cc2ca533..6d59b9ca8 100644 --- a/spec/reek/context/root_context_spec.rb +++ b/spec/reek/context/root_context_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/context/root_context' diff --git a/spec/reek/context/statement_counter_spec.rb b/spec/reek/context/statement_counter_spec.rb index b0e9d73b4..56a796b63 100644 --- a/spec/reek/context/statement_counter_spec.rb +++ b/spec/reek/context/statement_counter_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/context/statement_counter' diff --git a/spec/reek/context_builder_spec.rb b/spec/reek/context_builder_spec.rb index e34fc0782..2f7c5efff 100644 --- a/spec/reek/context_builder_spec.rb +++ b/spec/reek/context_builder_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../spec_helper' require_lib 'reek/context_builder' diff --git a/spec/reek/detector_repository_spec.rb b/spec/reek/detector_repository_spec.rb index 3252f982b..3d5746a9f 100644 --- a/spec/reek/detector_repository_spec.rb +++ b/spec/reek/detector_repository_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../spec_helper' require_lib 'reek/smell_detectors/base_detector' require_lib 'reek/detector_repository' diff --git a/spec/reek/documentation_link_spec.rb b/spec/reek/documentation_link_spec.rb index c02e2d42a..80a1a9115 100644 --- a/spec/reek/documentation_link_spec.rb +++ b/spec/reek/documentation_link_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../spec_helper' RSpec.describe Reek::DocumentationLink do diff --git a/spec/reek/errors/base_error_spec.rb b/spec/reek/errors/base_error_spec.rb index 126d91f47..af0886678 100644 --- a/spec/reek/errors/base_error_spec.rb +++ b/spec/reek/errors/base_error_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/errors/base_error' diff --git a/spec/reek/examiner_spec.rb b/spec/reek/examiner_spec.rb index d59523556..9ab7939e9 100644 --- a/spec/reek/examiner_spec.rb +++ b/spec/reek/examiner_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../spec_helper' require_lib 'reek/examiner' require_lib 'reek/logging_error_handler' diff --git a/spec/reek/logging_error_handler_spec.rb b/spec/reek/logging_error_handler_spec.rb index 7430f2ee1..1d5b17827 100644 --- a/spec/reek/logging_error_handler_spec.rb +++ b/spec/reek/logging_error_handler_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../spec_helper' require_lib 'reek/logging_error_handler' diff --git a/spec/reek/rake/task_spec.rb b/spec/reek/rake/task_spec.rb index 5fe6b5d5b..6656e8632 100644 --- a/spec/reek/rake/task_spec.rb +++ b/spec/reek/rake/task_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/rake/task' diff --git a/spec/reek/report/github_report_spec.rb b/spec/reek/report/github_report_spec.rb index 074a56aca..c04615c65 100644 --- a/spec/reek/report/github_report_spec.rb +++ b/spec/reek/report/github_report_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/examiner' require_lib 'reek/report/json_report' diff --git a/spec/reek/report/html_report_spec.rb b/spec/reek/report/html_report_spec.rb index f05c4091b..0049a9dc1 100644 --- a/spec/reek/report/html_report_spec.rb +++ b/spec/reek/report/html_report_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/examiner' require_lib 'reek/report/html_report' diff --git a/spec/reek/report/json_report_spec.rb b/spec/reek/report/json_report_spec.rb index 53d2c1365..3e313a1c6 100644 --- a/spec/reek/report/json_report_spec.rb +++ b/spec/reek/report/json_report_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/examiner' require_lib 'reek/report/json_report' diff --git a/spec/reek/report/location_formatter_spec.rb b/spec/reek/report/location_formatter_spec.rb index a89e90963..d84c2c303 100644 --- a/spec/reek/report/location_formatter_spec.rb +++ b/spec/reek/report/location_formatter_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/report/location_formatter' diff --git a/spec/reek/report/progress_formatter_spec.rb b/spec/reek/report/progress_formatter_spec.rb index f14443183..e217900f1 100644 --- a/spec/reek/report/progress_formatter_spec.rb +++ b/spec/reek/report/progress_formatter_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/report/progress_formatter' diff --git a/spec/reek/report/text_report_spec.rb b/spec/reek/report/text_report_spec.rb index e31b20d78..de1fb4e57 100644 --- a/spec/reek/report/text_report_spec.rb +++ b/spec/reek/report/text_report_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/examiner' require_lib 'reek/report/text_report' diff --git a/spec/reek/report/xml_report_spec.rb b/spec/reek/report/xml_report_spec.rb index 77591f245..849f64c45 100644 --- a/spec/reek/report/xml_report_spec.rb +++ b/spec/reek/report/xml_report_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/examiner' require_lib 'reek/report/xml_report' diff --git a/spec/reek/report/yaml_report_spec.rb b/spec/reek/report/yaml_report_spec.rb index ec9e3bcee..ba9b5c7f1 100644 --- a/spec/reek/report/yaml_report_spec.rb +++ b/spec/reek/report/yaml_report_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/examiner' require_lib 'reek/report/yaml_report' diff --git a/spec/reek/report_spec.rb b/spec/reek/report_spec.rb index ef6582b2a..12767a450 100644 --- a/spec/reek/report_spec.rb +++ b/spec/reek/report_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../spec_helper' require_lib 'reek/report' diff --git a/spec/reek/smell_configuration_spec.rb b/spec/reek/smell_configuration_spec.rb index a11b98593..d48217492 100644 --- a/spec/reek/smell_configuration_spec.rb +++ b/spec/reek/smell_configuration_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../spec_helper' require_lib 'reek/smell_configuration' diff --git a/spec/reek/smell_detectors/attribute_spec.rb b/spec/reek/smell_detectors/attribute_spec.rb index 49a020238..63f389e83 100644 --- a/spec/reek/smell_detectors/attribute_spec.rb +++ b/spec/reek/smell_detectors/attribute_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/attribute' diff --git a/spec/reek/smell_detectors/base_detector_spec.rb b/spec/reek/smell_detectors/base_detector_spec.rb index 25ed74d8a..f266e06e9 100644 --- a/spec/reek/smell_detectors/base_detector_spec.rb +++ b/spec/reek/smell_detectors/base_detector_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/base_detector' require_lib 'reek/smell_detectors/duplicate_method_call' diff --git a/spec/reek/smell_detectors/boolean_parameter_spec.rb b/spec/reek/smell_detectors/boolean_parameter_spec.rb index 467a08700..5afb8c1da 100644 --- a/spec/reek/smell_detectors/boolean_parameter_spec.rb +++ b/spec/reek/smell_detectors/boolean_parameter_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/boolean_parameter' diff --git a/spec/reek/smell_detectors/class_variable_spec.rb b/spec/reek/smell_detectors/class_variable_spec.rb index 78ef33081..4e5cfb036 100644 --- a/spec/reek/smell_detectors/class_variable_spec.rb +++ b/spec/reek/smell_detectors/class_variable_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/class_variable' diff --git a/spec/reek/smell_detectors/control_parameter_spec.rb b/spec/reek/smell_detectors/control_parameter_spec.rb index be7a1f83a..7a5de2708 100644 --- a/spec/reek/smell_detectors/control_parameter_spec.rb +++ b/spec/reek/smell_detectors/control_parameter_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/control_parameter' diff --git a/spec/reek/smell_detectors/data_clump_spec.rb b/spec/reek/smell_detectors/data_clump_spec.rb index f7cbd6b46..3dcbed908 100644 --- a/spec/reek/smell_detectors/data_clump_spec.rb +++ b/spec/reek/smell_detectors/data_clump_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/data_clump' diff --git a/spec/reek/smell_detectors/duplicate_method_call_spec.rb b/spec/reek/smell_detectors/duplicate_method_call_spec.rb index 17675d95d..baf78172b 100644 --- a/spec/reek/smell_detectors/duplicate_method_call_spec.rb +++ b/spec/reek/smell_detectors/duplicate_method_call_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/duplicate_method_call' diff --git a/spec/reek/smell_detectors/feature_envy_spec.rb b/spec/reek/smell_detectors/feature_envy_spec.rb index 050dd7286..0d92b5310 100644 --- a/spec/reek/smell_detectors/feature_envy_spec.rb +++ b/spec/reek/smell_detectors/feature_envy_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/feature_envy' diff --git a/spec/reek/smell_detectors/instance_variable_assumption_spec.rb b/spec/reek/smell_detectors/instance_variable_assumption_spec.rb index a75b392cc..93ab82120 100644 --- a/spec/reek/smell_detectors/instance_variable_assumption_spec.rb +++ b/spec/reek/smell_detectors/instance_variable_assumption_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/instance_variable_assumption' diff --git a/spec/reek/smell_detectors/irresponsible_module_spec.rb b/spec/reek/smell_detectors/irresponsible_module_spec.rb index a1404e8e2..1f1567567 100644 --- a/spec/reek/smell_detectors/irresponsible_module_spec.rb +++ b/spec/reek/smell_detectors/irresponsible_module_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/irresponsible_module' diff --git a/spec/reek/smell_detectors/long_parameter_list_spec.rb b/spec/reek/smell_detectors/long_parameter_list_spec.rb index 302fd8a06..77d841f96 100644 --- a/spec/reek/smell_detectors/long_parameter_list_spec.rb +++ b/spec/reek/smell_detectors/long_parameter_list_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/long_parameter_list' diff --git a/spec/reek/smell_detectors/long_yield_list_spec.rb b/spec/reek/smell_detectors/long_yield_list_spec.rb index d2f0c4938..a5d7f8795 100644 --- a/spec/reek/smell_detectors/long_yield_list_spec.rb +++ b/spec/reek/smell_detectors/long_yield_list_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/long_yield_list' diff --git a/spec/reek/smell_detectors/manual_dispatch_spec.rb b/spec/reek/smell_detectors/manual_dispatch_spec.rb index 94259a854..37668fb4b 100644 --- a/spec/reek/smell_detectors/manual_dispatch_spec.rb +++ b/spec/reek/smell_detectors/manual_dispatch_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/too_many_constants' diff --git a/spec/reek/smell_detectors/missing_safe_method_spec.rb b/spec/reek/smell_detectors/missing_safe_method_spec.rb index f8178b3c3..3c77c62ea 100644 --- a/spec/reek/smell_detectors/missing_safe_method_spec.rb +++ b/spec/reek/smell_detectors/missing_safe_method_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/missing_safe_method' diff --git a/spec/reek/smell_detectors/module_initialize_spec.rb b/spec/reek/smell_detectors/module_initialize_spec.rb index c53bbc745..55e7c04e9 100644 --- a/spec/reek/smell_detectors/module_initialize_spec.rb +++ b/spec/reek/smell_detectors/module_initialize_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/module_initialize' diff --git a/spec/reek/smell_detectors/nested_iterators_spec.rb b/spec/reek/smell_detectors/nested_iterators_spec.rb index 076bf7acd..75a5eb3fc 100644 --- a/spec/reek/smell_detectors/nested_iterators_spec.rb +++ b/spec/reek/smell_detectors/nested_iterators_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/nested_iterators' diff --git a/spec/reek/smell_detectors/nil_check_spec.rb b/spec/reek/smell_detectors/nil_check_spec.rb index 8d1269faa..7489666fa 100644 --- a/spec/reek/smell_detectors/nil_check_spec.rb +++ b/spec/reek/smell_detectors/nil_check_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/nil_check' diff --git a/spec/reek/smell_detectors/repeated_conditional_spec.rb b/spec/reek/smell_detectors/repeated_conditional_spec.rb index 20895201e..2bf023284 100644 --- a/spec/reek/smell_detectors/repeated_conditional_spec.rb +++ b/spec/reek/smell_detectors/repeated_conditional_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/repeated_conditional' diff --git a/spec/reek/smell_detectors/subclassed_from_core_class_spec.rb b/spec/reek/smell_detectors/subclassed_from_core_class_spec.rb index d1e1340e0..78d6b3e5b 100644 --- a/spec/reek/smell_detectors/subclassed_from_core_class_spec.rb +++ b/spec/reek/smell_detectors/subclassed_from_core_class_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/subclassed_from_core_class' diff --git a/spec/reek/smell_detectors/too_many_constants_spec.rb b/spec/reek/smell_detectors/too_many_constants_spec.rb index f50dc4460..374ca8479 100644 --- a/spec/reek/smell_detectors/too_many_constants_spec.rb +++ b/spec/reek/smell_detectors/too_many_constants_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/too_many_constants' diff --git a/spec/reek/smell_detectors/too_many_instance_variables_spec.rb b/spec/reek/smell_detectors/too_many_instance_variables_spec.rb index 983a46636..de46e6ce6 100644 --- a/spec/reek/smell_detectors/too_many_instance_variables_spec.rb +++ b/spec/reek/smell_detectors/too_many_instance_variables_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/too_many_instance_variables' diff --git a/spec/reek/smell_detectors/too_many_methods_spec.rb b/spec/reek/smell_detectors/too_many_methods_spec.rb index ca2e04452..3143ae182 100644 --- a/spec/reek/smell_detectors/too_many_methods_spec.rb +++ b/spec/reek/smell_detectors/too_many_methods_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/too_many_methods' diff --git a/spec/reek/smell_detectors/too_many_statements_spec.rb b/spec/reek/smell_detectors/too_many_statements_spec.rb index d95c01376..d1dc44064 100644 --- a/spec/reek/smell_detectors/too_many_statements_spec.rb +++ b/spec/reek/smell_detectors/too_many_statements_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/too_many_statements' diff --git a/spec/reek/smell_detectors/uncommunicative_method_name_spec.rb b/spec/reek/smell_detectors/uncommunicative_method_name_spec.rb index c567346a6..a2b51623d 100644 --- a/spec/reek/smell_detectors/uncommunicative_method_name_spec.rb +++ b/spec/reek/smell_detectors/uncommunicative_method_name_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/uncommunicative_method_name' diff --git a/spec/reek/smell_detectors/uncommunicative_module_name_spec.rb b/spec/reek/smell_detectors/uncommunicative_module_name_spec.rb index 5c55d9362..8d02da4b9 100644 --- a/spec/reek/smell_detectors/uncommunicative_module_name_spec.rb +++ b/spec/reek/smell_detectors/uncommunicative_module_name_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/uncommunicative_module_name' diff --git a/spec/reek/smell_detectors/uncommunicative_parameter_name_spec.rb b/spec/reek/smell_detectors/uncommunicative_parameter_name_spec.rb index f48b75575..9f1386bdf 100644 --- a/spec/reek/smell_detectors/uncommunicative_parameter_name_spec.rb +++ b/spec/reek/smell_detectors/uncommunicative_parameter_name_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/uncommunicative_parameter_name' diff --git a/spec/reek/smell_detectors/uncommunicative_variable_name_spec.rb b/spec/reek/smell_detectors/uncommunicative_variable_name_spec.rb index 165f6ca94..a44fb8266 100644 --- a/spec/reek/smell_detectors/uncommunicative_variable_name_spec.rb +++ b/spec/reek/smell_detectors/uncommunicative_variable_name_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/uncommunicative_variable_name' diff --git a/spec/reek/smell_detectors/unused_parameters_spec.rb b/spec/reek/smell_detectors/unused_parameters_spec.rb index 80b9e888e..731a99425 100644 --- a/spec/reek/smell_detectors/unused_parameters_spec.rb +++ b/spec/reek/smell_detectors/unused_parameters_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/unused_parameters' diff --git a/spec/reek/smell_detectors/unused_private_method_spec.rb b/spec/reek/smell_detectors/unused_private_method_spec.rb index 33c450a45..c6cb87ab9 100644 --- a/spec/reek/smell_detectors/unused_private_method_spec.rb +++ b/spec/reek/smell_detectors/unused_private_method_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/unused_private_method' diff --git a/spec/reek/smell_detectors/utility_function_spec.rb b/spec/reek/smell_detectors/utility_function_spec.rb index b05ca6470..de1827a54 100644 --- a/spec/reek/smell_detectors/utility_function_spec.rb +++ b/spec/reek/smell_detectors/utility_function_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/smell_detectors/utility_function' diff --git a/spec/reek/smell_warning_spec.rb b/spec/reek/smell_warning_spec.rb index 4caae7993..aae9b0452 100644 --- a/spec/reek/smell_warning_spec.rb +++ b/spec/reek/smell_warning_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../spec_helper' require_lib 'reek/smell_warning' diff --git a/spec/reek/source/source_code_spec.rb b/spec/reek/source/source_code_spec.rb index 81c006ad5..bed88237d 100644 --- a/spec/reek/source/source_code_spec.rb +++ b/spec/reek/source/source_code_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require 'stringio' require_lib 'reek/source/source_code' diff --git a/spec/reek/source/source_locator_spec.rb b/spec/reek/source/source_locator_spec.rb index 1baed6194..3faa19126 100644 --- a/spec/reek/source/source_locator_spec.rb +++ b/spec/reek/source/source_locator_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'pathname' require_relative '../../spec_helper' require_lib 'reek/configuration/app_configuration' diff --git a/spec/reek/spec/should_reek_of_spec.rb b/spec/reek/spec/should_reek_of_spec.rb index 628c89704..1c36bec75 100644 --- a/spec/reek/spec/should_reek_of_spec.rb +++ b/spec/reek/spec/should_reek_of_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'pathname' require_relative '../../spec_helper' require_lib 'reek/spec' diff --git a/spec/reek/spec/should_reek_only_of_spec.rb b/spec/reek/spec/should_reek_only_of_spec.rb index eb858afe4..d7588e823 100644 --- a/spec/reek/spec/should_reek_only_of_spec.rb +++ b/spec/reek/spec/should_reek_only_of_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/spec' diff --git a/spec/reek/spec/should_reek_spec.rb b/spec/reek/spec/should_reek_spec.rb index d297c5c38..8877fd293 100644 --- a/spec/reek/spec/should_reek_spec.rb +++ b/spec/reek/spec/should_reek_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/spec' diff --git a/spec/reek/spec/smell_matcher_spec.rb b/spec/reek/spec/smell_matcher_spec.rb index 4b6f95059..ffa8adf8f 100644 --- a/spec/reek/spec/smell_matcher_spec.rb +++ b/spec/reek/spec/smell_matcher_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../spec_helper' require_lib 'reek/spec/smell_matcher' diff --git a/spec/reek/tree_dresser_spec.rb b/spec/reek/tree_dresser_spec.rb index 35adb9b64..5eea78caf 100644 --- a/spec/reek/tree_dresser_spec.rb +++ b/spec/reek/tree_dresser_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../spec_helper' Reek::CLI::Silencer.without_warnings { require 'parser/ruby25' } require_lib 'reek/tree_dresser' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6bf065846..63c2c9187 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'pathname' require 'timeout' require 'rspec-benchmark' diff --git a/tasks/configuration.rake b/tasks/configuration.rake index befb58094..0571df7a7 100644 --- a/tasks/configuration.rake +++ b/tasks/configuration.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../lib/reek' require_relative '../lib/reek/detector_repository' require_relative '../lib/reek/configuration/rake_task_converter' diff --git a/tasks/console.rake b/tasks/console.rake index d5ed5184f..3ebf9fcaf 100644 --- a/tasks/console.rake +++ b/tasks/console.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + desc 'Starts the interactive console' task :console do require 'irb' diff --git a/tasks/reek.rake b/tasks/reek.rake index 4ef9940c3..d5f7a97a5 100644 --- a/tasks/reek.rake +++ b/tasks/reek.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../lib/reek/rake/task' Reek::Rake::Task.new do |t| diff --git a/tasks/rubocop.rake b/tasks/rubocop.rake index f8f85062a..6952500b0 100644 --- a/tasks/rubocop.rake +++ b/tasks/rubocop.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require 'rubocop/rake_task' diff --git a/tasks/test.rake b/tasks/test.rake index 18ea28d6e..b7022e461 100644 --- a/tasks/test.rake +++ b/tasks/test.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'cucumber/rake/task' require 'rspec/core/rake_task'