Skip to content

With FS1182 warnon, underscore code fixes insert two underscores #15620

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 Jul 18, 2023 · 2 comments · Fixed by #15663
Open
Tracked by #15408

With FS1182 warnon, underscore code fixes insert two underscores #15620

psfinaki opened this issue Jul 18, 2023 · 2 comments · Fixed by #15663
Assignees
Labels
Area-LangService-CodeFixes Code fixes associated with diagnostics Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone

Comments

@psfinaki
Copy link
Member

psfinaki commented Jul 18, 2023

In particular, "prefix with underscore" and "replace with underscore".

underscores.mp4
@github-actions github-actions bot added this to the Backlog milestone Jul 18, 2023
@psfinaki psfinaki mentioned this issue Jul 18, 2023
85 tasks
@psfinaki psfinaki changed the title "Prefix with underscore" code fix sometimes prefixes 2 underscores With FS1182 warnon, underscore code fixes insert two underscores Jul 18, 2023
@psfinaki psfinaki added the Area-LangService-CodeFixes Code fixes associated with diagnostics label Jul 18, 2023
@psfinaki
Copy link
Member Author

This happens because the diagnostic is produced twice - by the analyzer and by the compiler. Hence the same code fix is applied twice. It's just luck this doesn't provide broken code and only looks weird.

@0101 0101 added Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. and removed Needs-Triage labels Jul 24, 2023
@github-project-automation github-project-automation bot moved this from Not Planned to Done in F# Compiler and Tooling Jul 31, 2023
@psfinaki
Copy link
Member Author

Reopening to fix properly, see this discussion.

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 Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants