-
Notifications
You must be signed in to change notification settings - Fork 174
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
Internal errors occurring for various Layout/* cops #2840
Comments
👋 Are you seeing errors if you run |
Same here. Running |
@simonaslaurinavicius are you also using standardrb? |
Also please share the versions of RuboCop/standardrb being used. |
@andyw8 nope, I'm using Rubocop. I'm using different Rubocop versions throughout multiple projects:
The errors persist on all the versions. Running the formatter through the command lines works fine. |
I'm still unable to reproduce. Could one of you please share a video showing the exact change you're making? Ideally on a minimal code sample. |
Do any of you happen to have the |
Thank you very much, @Earlopain, bumping Rubocop to version 1.68.0 indeed solved my issue!🙇♂ |
Just checking, do you have |
For me that's a yes, |
Thanks for confirming. There's a PR to update RuboCop to the needed version for standard at standardrb/standard#659. |
As of the past few days, my Ruby LSP keeps getting into a weird state where it spews these errors with every key stroke. I notice in my LSP logs, there's lots of
I'm not using Standard RB. rubocop 1.66.1, ruby-lsp 0.21.3, ruby-lsp-rails 0.3.26. This file is indeed violating Layout/FirstHashElementIndentation (I'm in the middle of edits), but I'm not sure why it's printing this error instead of just showing the info virtual text at the end of the line, like it usually does. |
I can confirm that updating to the latest version of Rubocop ( |
Some, but for |
I've updated rubocop to 1.68.0, ruby-lsp is 0.21.3. I am using asdf. I'm also not using Set output log level to 'trace' and found the following:
Setting enabledFeatures to disable
|
Description
Ruby LSP Information
Ruby LSP Information
VS Code Version
1.95.1
Ruby LSP Extension Version
0.8.13
Ruby LSP Server Version
0.21.3
Ruby LSP Addons
Ruby Version
3.1.4
Ruby Version Manager
asdf
Installed Extensions
Click to expand
Ruby LSP Settings
Click to expand
Workspace
User
Reproduction steps
Other Layout/* cops that come standard with StandardRB experience the same issue. Ones I've seen include:
Layout/IndentationConsistency
Layout/FirstArrayElementIndentation
Layout/IndentationWidth
I haven't seen any other cops cause this issue. For instance, with the below code snippet, I can change the strings at the end of the file to use single quotes and they will display inline linting issues correctly and the file will automatically format/fix on save. However, if I add extra indentation to practically any line, I get diagnostic or formatting errors with no other information.
Example code
The text was updated successfully, but these errors were encountered: