Skip to content

fix: remove redundant rule id from diagnostic message#32

Open
314systems wants to merge 1 commit into
textlint:mainfrom
314systems:fix/duplicate-rule-id-in-hover
Open

fix: remove redundant rule id from diagnostic message#32
314systems wants to merge 1 commit into
textlint:mainfrom
314systems:fix/duplicate-rule-id-in-hover

Conversation

@314systems

@314systems 314systems commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Close #31

fixed

The rule id was shown twice in the VS Code diagnostic hover: once
embedded in the message text and once as the diagnostic code. Drop the
embedded copy and keep the code so it is displayed only once.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes issue #31 where VS Code’s diagnostic hover displayed the textlint rule id twice by removing the rule id suffix from the diagnostic message while keeping the rule id in the diagnostic code field.

Changes:

  • Stop appending (${ruleId}) to the LSP diagnostic message in the textlint server.
  • Update extension integration test expectations to match the new diagnostic message text.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/textlint-server/src/server.ts Removes rule id concatenation from Diagnostic.message while retaining Diagnostic.code = ruleId.
packages/textlint/test/extension.test.ts Updates expected diagnostics’ message strings to no longer include the rule id suffix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Diagnostic hover displays duplicated rule id

2 participants