-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[Fix #14475] Fix cop errors during autocorrect for the buildin LSP when analyzing as Ruby 3.4 #14478
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
Conversation
| # rubocop:disable Metrics/AbcSize, Metrics/MethodLength | ||
| def with_server( | ||
| source = nil, path = 'fake.rb', pwd: '..', stub_no_typechecker: false, load_addons: true | ||
| source = nil, path = 'fake.rb', stub_no_typechecker: false, load_addons: true |
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 removed the pwd option. This test is already isolated and going one dir down interferes with the .rubocop.yml created in the test
| RUBY | ||
| end | ||
|
|
||
| context 'with prism as the parser' do |
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.
This test is very specific but I couldn't come up with a better one. This does run into an infinite loop before this change
b8d792d to
d011636
Compare
… LSP when analyzing as Ruby 3.4 After autocorrect happened, it still reused it the parse result from the initial file, causing all kind of trouble.
d011636 to
609a4a0
Compare
|
Your changes seem good to me. Thanks! |
RuboCop 1.80.1 contains a fix for why this was broken, so it should be safe to enable this again. Revert: Shopify#3672 Fix: rubocop/rubocop#14478
RuboCop 1.80.1 contains a fix for why this was broken, so it should be safe to enable this again. Revert: Shopify#3672 Fix: rubocop/rubocop#14478
RuboCop 1.80.1 contains a fix for why this was broken, so it should be safe to enable this again. Revert: Shopify#3672 Fix: rubocop/rubocop#14478
RuboCop 1.80.1 contains a fix for why this was broken, so it should be safe to enable this again. Revert: #3672 Fix: rubocop/rubocop#14478
Fix #14475
After autocorrect happened, it still reused it the parse result from the initial file, causing all kind of trouble.
cc @vinistock
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}.mdif the new code introduces user-observable changes. See changelog entry format for details.