Skip to content

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

Merged
vinistock merged 1 commit into
Shopify:mainfrom
PerfectMemory:fix/rubocop-ns
Jan 10, 2025
Merged

Use top level namespace operand on Rubocop (#3044)#3045
vinistock merged 1 commit into
Shopify:mainfrom
PerfectMemory:fix/rubocop-ns

Conversation

@abrisse
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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