Skip to content

Add Rubydex linter Ruby LSP addon - #987

Open
st0012 wants to merge 1 commit into
mainfrom
codex/linter-ruby-lsp-integration
Open

Add Rubydex linter Ruby LSP addon#987
st0012 wants to merge 1 commit into
mainfrom
codex/linter-ruby-lsp-integration

Conversation

@st0012

@st0012 st0012 commented Aug 6, 2026

Copy link
Copy Markdown
Member

Add an optional Ruby LSP add-on that runs discovered Rubydex linter rules after saved workspace changes and publishes severity and related information with each diagnostic. It reuses the workspace graph, clears stale diagnostics, and treats workspaces without rules as a no-op.

@st0012
st0012 force-pushed the codex/linter-explain-command branch from 5524cc9 to f5d2a4c Compare August 6, 2026 17:17
@st0012
st0012 force-pushed the codex/linter-ruby-lsp-integration branch from cf7903a to 90fed04 Compare August 6, 2026 17:17
@st0012
st0012 force-pushed the codex/linter-explain-command branch from f5d2a4c to 1e1bd9c Compare August 6, 2026 18:32
@st0012
st0012 force-pushed the codex/linter-ruby-lsp-integration branch from 90fed04 to 5f23055 Compare August 6, 2026 18:32
@st0012
st0012 force-pushed the codex/linter-explain-command branch from 1e1bd9c to e52a7ef Compare August 6, 2026 19:30
@st0012
st0012 force-pushed the codex/linter-ruby-lsp-integration branch from 5f23055 to 24921d7 Compare August 6, 2026 19:30
@st0012
st0012 force-pushed the codex/linter-explain-command branch from e52a7ef to f2fcd8a Compare August 6, 2026 20:33
@st0012
st0012 force-pushed the codex/linter-ruby-lsp-integration branch 2 times, most recently from 4bc5773 to 1c7f1e7 Compare August 6, 2026 21:06
@st0012
st0012 force-pushed the codex/linter-explain-command branch from f2fcd8a to 59c5d99 Compare August 6, 2026 21:06
@st0012
st0012 force-pushed the codex/linter-ruby-lsp-integration branch from 1c7f1e7 to c210581 Compare August 7, 2026 17:11
@st0012
st0012 force-pushed the codex/linter-explain-command branch from 59c5d99 to 38b16d7 Compare August 7, 2026 17:11
@st0012
st0012 changed the base branch from codex/linter-explain-command to codex/linter-rule-authoring August 7, 2026 17:11
@st0012
st0012 force-pushed the codex/linter-rule-authoring branch 2 times, most recently from ed23857 to 0a7b9e1 Compare August 7, 2026 20:16
@st0012
st0012 force-pushed the codex/linter-ruby-lsp-integration branch from c210581 to 12adbe4 Compare August 7, 2026 20:21
Base automatically changed from codex/linter-rule-authoring to main August 7, 2026 21:26
@st0012
st0012 force-pushed the codex/linter-ruby-lsp-integration branch from 12adbe4 to b1a3c36 Compare August 7, 2026 22:00

#: (Graph, rules: Array[singleton(Rule)], config: LinterConfig) -> void
def initialize(graph, rules:, config:)
raise ArgumentError, "At least one linter rule is required" if rules.empty?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We need to stop raising this or the addon would raise in projects don't have rules.

module Linter
module RubyLsp
class Addon < ::RubyLsp::Addon
CONFIGURATION_FILE = "rubydex.toml" #: String

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This name is declared in Rust so we don't have a way to avoid this here.

@st0012
st0012 marked this pull request as ready for review August 7, 2026 22:19
@st0012
st0012 requested a review from a team as a code owner August 7, 2026 22:19
@st0012 st0012 self-assigned this Aug 7, 2026
@st0012 st0012 changed the title Add Rubydex linter diagnostics to Ruby LSP Add Rubydex linter Ruby LSP addon Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant