-
Notifications
You must be signed in to change notification settings - Fork 207
Pick up changes from .rubocop-todo.yml #3625
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
base: main
Are you sure you want to change the base?
Conversation
How to use the Graphite Merge QueueAdd the label graphite-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
I have signed the CLA! |
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.
Thanks for the PR! Some minor comments, but this is basically it
test/server_test.rb
Outdated
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.
The tests here a bit mixed. Some of these are validating other logic using the RuboCop configuration file, but it's not directly related.
Can we please simply make another version of test_rubocop_config_changes_trigger_workspace_diagnostic_refresh
that uses the RuboCop todo file instead of .rubocop.yml
? That should be enough. And then feel free to extract a common method to test the two of them.
7131bca
to
53df420
Compare
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.
Just some minor comments and it looks good to ship
".rubocop.yml", | ||
".rubocop", | ||
".rubocop_todo.yml", | ||
] #: Array[String] |
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.
Let's freeze it because then Sorbet will automatically know that this is a 3 element Tuple of strings instead of an array of arbitrary size.
] #: Array[String] | |
].freeze |
}) | ||
|
||
@server.global_state.index.index_all(uris: []) | ||
assert_rubocop_config_triggers_diagnostic_refresh_without_setup(config_file) |
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.
assert_rubocop_config_triggers_diagnostic_refresh_without_setup(config_file) | |
assert_rubocop_config_triggers_diagnostic_refresh_without_setup(uri) |
def assert_rubocop_config_triggers_diagnostic_refresh_without_setup(config_file) | ||
uri = URI::Generic.from_path(path: File.join(Dir.pwd, config_file)) | ||
|
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.
def assert_rubocop_config_triggers_diagnostic_refresh_without_setup(config_file) | |
uri = URI::Generic.from_path(path: File.join(Dir.pwd, config_file)) | |
def assert_rubocop_config_triggers_diagnostic_refresh_without_setup(uri) |
Motivation
Closes #3609
Pick up changes in
.rubocop_todo.yml
.Implementation
As suggested by @vinistock, adjust the patterns for rubocop config files.
Automated Tests
I'm not sure all the tests I've added are relevant, I'm open to changing them with some feedback and guidance.
Manual Tests
I couldn't make Cursor use my local version of
.ruby-lsp
😬, I'd be happy to get information about how I can test this.