Skip to content
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

Use top level namespace operand on Rubocop (#3044) #3045

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

abrisse
Copy link
Contributor

@abrisse abrisse commented Jan 10, 2025

Motivation

Close #3044 caused by rubocop 1.70+ that adds the module RubyLsp::Rubocop (link).

Implementation

Basically make sure to use the top level namespace operand when using Rubocop classes within the namespace RubyLsp.

So RuboCop::Cop for example is now replaced by ::RuboCop::Cop.

Automated Tests

No tests are required for this PR.

Manual Tests

@abrisse abrisse requested a review from a team as a code owner January 10, 2025 17:03
@st0012 st0012 added the bugfix This PR will fix an existing bug label Jan 10, 2025
Copy link
Member

@st0012 st0012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm this fixes the issue. Thank you very much for reporting the issue and make this PR.
Can you please sign the CLA so we can merge it?

@st0012 st0012 added the server This pull request should be included in the server gem's release notes label Jan 10, 2025
@abrisse
Copy link
Contributor Author

abrisse commented Jan 10, 2025

@st0012. Glad I could help. I have signed the CLA.

@vinistock vinistock enabled auto-merge (squash) January 10, 2025 21:25
@vinistock vinistock merged commit f3bf3cd into Shopify:main Jan 10, 2025
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR will fix an existing bug server This pull request should be included in the server gem's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uninitialized constant RubyLsp::RuboCop::Cop (NameError)
3 participants