-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix #12547] User experience for infinite loop detected #12655
[Fix #12547] User experience for infinite loop detected #12655
Conversation
… to the latest version in case of 'Infinite loop detected' error.
3f7880a
to
60b24d1
Compare
lib/rubocop/runner.rb
Outdated
@@ -20,6 +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"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest dropping the quotes around the URL.
lib/rubocop/runner.rb
Outdated
@@ -20,6 +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,' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be problematic to have newlines here, especially if other programs need to consume the output. The maintainers can probably say more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review!
I rewrote it in a form without line breaks.
Nice! |
b83e715
to
9549f0f
Compare
@koic any thoughts? |
I think that's a good small improvement. Sorry for taking so long to merge this! |
#12547
This pull request includes the following:
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).bundle exec rake default
. It executes all tests and runs RuboCop on its own code.{change_type}_{change_description}.md
if the new code introduces user-observable changes. See changelog entry format for details.