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

Add codefix to convert C# using to F# open #14064

Merged

Conversation

cartermp
Copy link
Contributor

I was writing some F# code yesterday and inadvertently pasted in some C# using statements. There was an example in C# but not F#, and my flow was: copy usings --> write code --> profit.

Anyways, I was annoyed that I copied C# code and felt that this could be a code fix. So I made this:

image

Two things it doesn't handle:

  • Copying a C# using onto the same line as an existing F# open
  • Converting a block of usings into a block of opens

But still, I think it's useful enough as-is.

Copy link
Member

@vzarytovskii vzarytovskii left a comment

Choose a reason for hiding this comment

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

Sweet

@KevinRansom
Copy link
Member

Lol this is hilarious.

@vzarytovskii vzarytovskii merged commit c328e3d into dotnet:main Oct 11, 2022
@edgarfgp
Copy link
Contributor

We need one to convert var to let 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants