feat(LC0095, LC0099): split unreferenced-parameter rule into LC0095 and LC0099 - #425
Open
MODUSCarstenScholling wants to merge 1 commit into
Open
Conversation
…nd LC0099 Separate unreferenced parameter diagnostics by procedure kind: - Keep LC0095 for regular non-local procedures (internal/public) - Introduce LC0099 for event subscribers (Info severity) Implement a shared code fix provider for both diagnostics: - Keep scoped equivalence keys for regular procedures and event subscribers - Use custom Fix All with one-pass RemoveNodes on separated parameter lists - Keep fallback behavior when fixAllSpans is empty in document scope Improve maintainability and consistency: - Align naming in tests and fix-all scenarios - Keep netstandard2.1 compatibility behavior intact Expand and update test coverage: - Add and adjust diagnostic, single-fix, and fix-all cases for both scopes - Verify focused ParameterNotReferenced test suite passes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR splits the previous unreferenced-parameter behavior into two diagnostics with clear scope boundaries:
It also keeps a shared code fix implementation and updates tests and documentation accordingly.
What changed
Analyzer:
Code fix:
Tests:
Why
AA0137 does not cover this full space:
Splitting the diagnostics improves clarity, allows better policy tuning, and keeps fix behavior deterministic.
Validation
Breaking changes
No runtime breaking changes.
Diagnostic behavior changes:
Implements #426