add code fix for wildcard _ in pattern match for fs43 on |->#1157
add code fix for wildcard _ in pattern match for fs43 on |->#1157jkone27 wants to merge 5 commits intoionide:mainfrom
Conversation
TheAngryByrd
left a comment
There was a problem hiding this comment.
@dawedawe mentioned some good fixes
Co-authored-by: dawe <dawedawe@posteo.de>
remove comments
|
Needs a format but otherwise LGTM. |
|
fixed the suggestions, not clear how i run format, can it be added as a git hook at commit phase on master? i am not very familiar with fantomas, would be good if it could be hooked onto |
|
Hi, Running this target sets up the git hook:
And I think it would be nice to see a message when fails. Something like |
|
@jkone27 Could you have a look at the conflicts. Seems that this almost ready :) |
Suggest
| _ ->for match mistaken with infix operator|->add code fix for wildcard operator suggestion in pattern match for fs43, targets:
dotnet/fsharp#15748
as worked in amplifying fsharp session:
https://amplifying-fsharp.github.io/sessions/2023/09/01/
WHY
the operator |-> is not defined, so this is usually just a user forgetting to complete the match
HOW
🤖 Generated by Copilot at df83900
FsAutoComplete.CodeFix.AddMissingWildcardOperatorinsrc/FsAutoComplete/CodeFixes/AddMissingWildcardOperator.fsand its signature file insrc/FsAutoComplete/CodeFixes/AddMissingWildcardOperator.fsi(link, link)CodeFixtype and theSyntaxVisitorBaseandSyntaxTraversalutilities (link, link)AdaptiveFSharpLspServertype insrc/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs(link)FSharpLspServertype insrc/FsAutoComplete/LspServers/FsAutoComplete.Lsp.fs(link)FsAutoComplete.Tests.CodeFixTests.AddMissingWildcardOperatorTestsintest/FsAutoComplete.Tests.Lsp/CodeFixTests/AddMissingWildcardOperatorTests.fs(link)CodeFixandDiagnosticsutilities (link)testsfunction intest/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs(link)