Skip to content

A code fix to convert sprintf to interpolated string #15415

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

Open
Tracked by #15408
psfinaki opened this issue Jun 15, 2023 · 1 comment
Open
Tracked by #15408

A code fix to convert sprintf to interpolated string #15415

psfinaki opened this issue Jun 15, 2023 · 1 comment
Labels
Area-LangService-CodeFixes Code fixes associated with diagnostics Feature Request
Milestone

Comments

@psfinaki
Copy link
Member

Originally suggested by @0101

Basically something to convert

let greet (name : string) =
    sprintf "Hello, %s." name

to

let greet (name : string) =
    $"Hello, {name}."
@Smaug123
Copy link
Contributor

(It would be nice to retain the format specifier here. A refactor that removes type safety is a bit sad!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-LangService-CodeFixes Code fixes associated with diagnostics Feature Request
Projects
Status: New
Development

No branches or pull requests

3 participants