Repository navigation
Conversation
vinistock
marked this pull request as ready for review
January 16, 2025 15:54
andyw8
approved these changes
Jan 16, 2025
Member
Author
Merge activity
|
vinistock
deleted the
01-16-check_if_rubocop_is_available_before_searching_for_add-on
branch
January 16, 2025 16:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
This is a fix for the bug I just introduced in #3067 🤦♂️. We cannot assume that the
RuboCopconstant will be defined because projects may use a different formatter. We need to check first.Implementation
Started checking if the constant we need is defined as part of the check.
Automated Tests
Part of why this wasn't caught is because our integration tests were ignoring the response return for the initialize request.
That makes the tests extremely weak because the LSP will actually rescue anything that happens during initialize and then simply return an error back to the client, which means that tests passed despite initialization failing.
I started properly checking for what response was returned, so that we can fail tests if initialization was not successful. Without the fix, tests now properly fail.