diff --git a/lib/rubocop/runner.rb b/lib/rubocop/runner.rb index 47048619fb5a..6eb86e117acc 100644 --- a/lib/rubocop/runner.rb +++ b/lib/rubocop/runner.rb @@ -20,9 +20,9 @@ def initialize(path, offenses_by_iteration, loop_start: -1) message = 'Infinite loop detected' message += " in #{path}" if path message += " and caused by #{root_cause}" if root_cause - message += ' \n\nPlease update to the latest RuboCop version if not already in use,' - message += ' \nand report a bug if the issue still occurs on this version.' - message += ' \n\nPlease check the latest version at https://rubygems.org/gems/rubocop' + message += ' Hint: Please update to the latest RuboCop version if not already in use,' + message += ' and report a bug if the issue still occurs on this version.' + message += ' Please check the latest version at https://rubygems.org/gems/rubocop' super(message) end end diff --git a/spec/rubocop/runner_spec.rb b/spec/rubocop/runner_spec.rb index 43f7bcf5d4c0..9ba20423f67e 100644 --- a/spec/rubocop/runner_spec.rb +++ b/spec/rubocop/runner_spec.rb @@ -316,9 +316,9 @@ class Klass described_class::InfiniteCorrectionLoop, "Infinite loop detected in #{source_file_path} and caused by " \ 'Test/ClassMustBeAModuleCop -> Test/ModuleMustBeAClassCop ' \ - '\n\nPlease update to the latest RuboCop version if not already in use, ' \ - '\nand report a bug if the issue still occurs on this version. ' \ - '\n\nPlease check the latest version at https://rubygems.org/gems/rubocop' + 'Hint: Please update to the latest RuboCop version if not already in use, ' \ + 'and report a bug if the issue still occurs on this version. ' \ + 'Please check the latest version at https://rubygems.org/gems/rubocop' ) end end @@ -339,9 +339,9 @@ class AnotherKlass described_class::InfiniteCorrectionLoop, "Infinite loop detected in #{source_file_path} and caused by " \ 'Test/ClassMustBeAModuleCop -> Test/ModuleMustBeAClassCop ' \ - '\n\nPlease update to the latest RuboCop version if not already in use, ' \ - '\nand report a bug if the issue still occurs on this version. ' \ - '\n\nPlease check the latest version at https://rubygems.org/gems/rubocop' + 'Hint: Please update to the latest RuboCop version if not already in use, ' \ + 'and report a bug if the issue still occurs on this version. ' \ + 'Please check the latest version at https://rubygems.org/gems/rubocop' ) end end @@ -379,9 +379,9 @@ class A_A "Infinite loop detected in #{source_file_path} and caused by " \ 'Test/ClassMustBeAModuleCop, Test/AtoB ' \ '-> Test/ModuleMustBeAClassCop, Test/BtoA ' \ - '\n\nPlease update to the latest RuboCop version if not already in use, ' \ - '\nand report a bug if the issue still occurs on this version. ' \ - '\n\nPlease check the latest version at https://rubygems.org/gems/rubocop' + 'Hint: Please update to the latest RuboCop version if not already in use, ' \ + 'and report a bug if the issue still occurs on this version. ' \ + 'Please check the latest version at https://rubygems.org/gems/rubocop' ) end end @@ -416,9 +416,9 @@ class A described_class::InfiniteCorrectionLoop, "Infinite loop detected in #{source_file_path} and caused by " \ 'Test/AtoB -> Test/BtoC -> Test/CtoA ' \ - '\n\nPlease update to the latest RuboCop version if not already in use, ' \ - '\nand report a bug if the issue still occurs on this version. ' \ - '\n\nPlease check the latest version at https://rubygems.org/gems/rubocop' + 'Hint: Please update to the latest RuboCop version if not already in use, ' \ + 'and report a bug if the issue still occurs on this version. ' \ + 'Please check the latest version at https://rubygems.org/gems/rubocop' ) end end