-
Notifications
You must be signed in to change notification settings - Fork 193
Upgrade RuboCop related gems #3367
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,7 +111,11 @@ def run(path, contents) | |
rescue ::RuboCop::ValidationError => error | ||
raise ConfigurationError, error.message | ||
rescue StandardError => error | ||
raise InternalRuboCopError, error | ||
# Maintain the original backtrace so that debugging cops that are breaking is easier, but re-raise as a | ||
# different error class | ||
internal_error = InternalRuboCopError.new(error) | ||
internal_error.set_backtrace(error.backtrace) | ||
raise internal_error | ||
Comment on lines
+114
to
+118
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While trying to understand if the bug I was seeing was in our code or in RuboCop's, I noticed that we were discarding the original backtrace for internal RuboCop errors. That's not good, because we want to help people fix bugs in cops and not just point the backtrace to our own code. Here I changed to use |
||
end | ||
|
||
#: -> String | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Could we migrate these as plugins?