Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fading span for unnecessary using #59276

Merged
merged 6 commits into from
Feb 7, 2022

Conversation

CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Feb 4, 2022

Fixes #1322

@@ -172,8 +173,40 @@ static bool ShouldFade(AnalyzerOptions options, SyntaxTree tree, string language
}
}

protected virtual Func<SyntaxNode, SyntaxToken>? GetLastTokenDelegateForContiguousSpans()
=> null;
private IEnumerable<TextSpan> GetContiguousSpans(ImmutableArray<SyntaxNode> nodes)
Copy link
Member Author

Choose a reason for hiding this comment

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

this is a move from an extension method to the single feature that used it.

@@ -977,5 +977,34 @@ public async Task TestAfterFileScopedNamespace()
@"namespace N;
$$");
}

Copy link
Member Author

Choose a reason for hiding this comment

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

oops. part of another fix. will break out.

Copy link
Member

Choose a reason for hiding this comment

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

The using span changes look good. Let me know when the PR is fixed up and I'll give it a final look over.

@CyrusNajmabadi CyrusNajmabadi merged commit 0e73c8c into dotnet:main Feb 7, 2022
@CyrusNajmabadi CyrusNajmabadi deleted the importFadingSpan branch February 7, 2022 15:58
@ghost ghost added this to the Next milestone Feb 7, 2022
@RikkiGibson RikkiGibson modified the milestones: Next, 17.2.P2 Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unused usings feature does not deal with trivia correctly
4 participants