Skip to content

Dead-code rules link to their docs, full-stack C# dead-code test, and the plan rows existing suites prove - #615

Merged
MelbourneDeveloper merged 7 commits into
mainfrom
chore/finish-plans-6
Nov 20, 2026
Merged

MelbourneDeveloper merged 7 commits into
mainfrom
chore/finish-plans-6

Conversation

@MelbourneDeveloper

Copy link
Copy Markdown
Collaborator

TLDR

The dead-code rules SLSPC0101 and SLSPF0101 now link to their documentation, a full-stack C# dead-code test is added, and 16 plan rows across four plans are ticked: 11 already proved by existing tests or a checked resolution, 5 by this PR.

Details

  • Rule documentation links:
    • SharpLsp.Sidecar.Common/RuleDocumentation.cs (new) is the one place for a SharpLsp rule's documentation URL. Both sidecars use it as the diagnostic's HelpLink, which becomes codeDescription.href.
    • SLSPC0101 (C#) and SLSPF0101 (F#) point at the website's new Diagnostics › Dead code section (id="dead-code"). Other SharpLsp rules keep no link.
  • Full-stack C# dead-code test: configuration_live.rs csharp_unused_public_types_are_dead_only_in_a_monorepo runs through the real host and C# sidecar.
    • A standard repository reports only the unused internal type, as a warning.
    • Declaring a monorepo in sharplsp.toml also reports the unused public type, and both become errors.
    • Turning monorepo off again restores the first state.
    • LiveSession now takes the rule code, so the existing F# test and this one share it.
  • Plan rows ticked:
    • DIAGNOSTICS-STATIC-ANALYZERS: 10 rows, covering hot-reload, the C# and F# candidate and reference counting, full-stack F# and C#, and the code descriptions.
    • RIDER-PLUGIN: 5 rows. The CI jobs run on JDK 21, which the current Rider SDK needs. Build, package, test and clean are the private _*-rider legs, because the Makefile's twelve public targets are its whole surface.
    • DISTRIBUTION: the mocha 11 / diff 7 advisory is gone; the tree resolves diff 9 and npm audit reports 0 vulnerabilities.
    • The static-analyzer plan was written for workspace.repository_kind. What shipped is [analyzers] dead_code / monorepo, and the ticked rows say so.
  • Left open, with reasons in the plans:
    • lint-rider: no Kotlin linter is configured, and gradlew check would rerun the tests.
    • The FCS candidate row: union cases, record fields, active patterns and delegates aren't each tested.
    • The fix-all row: one action per scope shipped, but the plan describes one action plus a scope prompt.

How Do The Automated Tests Prove It Works?

  • FSharpAnalyzersTests buildDiagnostic maps a 1-based range… now also asserts that SLSPF0101 carries the dead-code docs link and SLSPF0102 carries none.
  • DeadCodeAnalyzerTests.NonMonorepo_reports_private_and_internal_dead_code_as_warnings asserts the SLSPC0101 link.
  • Both of the above failed with Actual: "" before the change. Now the F# suite passes 15/15 and the C# suite 6/6, with warnings as errors.
  • configuration_live.rs: the new C# test and the existing F# test both pass (2/2) against the real host and sidecars.
  • The website builds, and _site/docs/diagnostics/index.html carries <h2 id="dead-code">.
  • cargo clippy --all-targets, cargo fmt --check, csharpier check and deslop are clean.

…lector, reference-count and F# full-stack rows the existing suites prove
…les carry the website's Diagnostics › Dead code section as codeDescription, from one shared RuleDocumentation constant
…n unused public type is dead only in a monorepo and an unused internal type always is; ticks the two C# full-stack rows
…ivate _build/_test/_clean-rider legs; lint-rider stays open pending a Kotlin linter decision
@MelbourneDeveloper
MelbourneDeveloper enabled auto-merge (squash) November 19, 2026 23:42
…RuleDocumentation's full name (IDE0002 in the repository's own diagnostics check)
@MelbourneDeveloper
MelbourneDeveloper merged commit 72dfec5 into main Nov 20, 2026
63 checks passed
@MelbourneDeveloper
MelbourneDeveloper deleted the chore/finish-plans-6 branch November 20, 2026 01:03
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