Prepend first statement of using block with a newline, if opening bracket is on same line as using statement#53015
Merged
CyrusNajmabadi merged 5 commits intodotnet:mainfrom Apr 29, 2021
zanseb:fix-52970
Merged
Prepend first statement of using block with a newline, if opening bracket is on same line as using statement#53015CyrusNajmabadi merged 5 commits intodotnet:mainfrom zanseb:fix-52970
CyrusNajmabadi merged 5 commits intodotnet:mainfrom
zanseb:fix-52970
Conversation
…cket is on same line as using statement
sharwell
suggested changes
Apr 29, 2021
Contributor
sharwell
left a comment
There was a problem hiding this comment.
Overall seems like a fine approach. Implementation has a small amount of specific suggested cleanup. Current tests are good, but I'd like to see two more added.
src/Analyzers/CSharp/Tests/UseSimpleUsingStatement/UseSimpleUsingStatementTests.cs
Show resolved
Hide resolved
src/Analyzers/CSharp/Tests/UseSimpleUsingStatement/UseSimpleUsingStatementTests.cs
Show resolved
Hide resolved
...Analyzers/CSharp/CodeFixes/UseSimpleUsingStatement/UseSimpleUsingStatementCodeFixProvider.cs
Outdated
Show resolved
Hide resolved
...Analyzers/CSharp/CodeFixes/UseSimpleUsingStatement/UseSimpleUsingStatementCodeFixProvider.cs
Outdated
Show resolved
Hide resolved
...Analyzers/CSharp/CodeFixes/UseSimpleUsingStatement/UseSimpleUsingStatementCodeFixProvider.cs
Outdated
Show resolved
Hide resolved
Add 2 additional unittests Prefer 'Any' instead of 'Count == 0' Use 'SyntaxFactory' instead of 'CSharpSyntaxFacts.Instance'
Contributor
Author
|
Thank you for your feedback @sharwell, I applied your suggestions. |
sharwell
approved these changes
Apr 29, 2021
...Analyzers/CSharp/CodeFixes/UseSimpleUsingStatement/UseSimpleUsingStatementCodeFixProvider.cs
Outdated
Show resolved
Hide resolved
…leUsingStatementCodeFixProvider.cs Co-authored-by: Sam Harwell <sam@tunnelvisionlabs.com>
...Analyzers/CSharp/CodeFixes/UseSimpleUsingStatement/UseSimpleUsingStatementCodeFixProvider.cs
Outdated
Show resolved
Hide resolved
CyrusNajmabadi
approved these changes
Apr 29, 2021
Contributor
|
@zanseb i made a small suggestion. LMK if you want to take it. If not, i'm fine merging this in as-is. |
Contributor
Author
|
@CyrusNajmabadi I was thinking about this change too. Applied your suggestion, thanks! |
Contributor
|
awesome. thanks for the contribution! |
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.
Prepend first statement of using block with a newline, if opening bracket is on same line as using statement
Fixes #52970