Shopify / Shopify/ruby-lsp

Allow clearing diagnostics from addons

Open
#3,736 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help-wanted pinned
Dominant language
Ruby
Stars
2k
Forks
281
Avg merge
2h 14m
Merged PRs (30d)
6

Description

I have checked that this feature is not already implemented
  • This feature does not exist
Use case

Formatter addons should be able to clear diagnostics

Description

Trying to get the rubocop addon up to the same level as the original addon. One thing I'm stuck with is that when .rubocop.yml changes, diagnostics are cleared: https://github.com/Shopify/ruby-lsp/blob/83e7cb0b502a9cd5a7e49a6bfb490f624ced2bd8/lib/ruby_lsp/server.rb#L1098-L1104

But I don't think I have access to the store in an addon. How could I make that functionality accessible in an addon?

Implementation

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/ruby_lsp/server.rb around lines 1098-1104 to understand how diagnostics are cleared, then inspect the addon interfaces and the RuboCop addon path. Expose an addon-accessible way to clear diagnostics so configuration changes can remove them, and verify the RuboCop addon reaches parity with the original addon behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.