-
Notifications
You must be signed in to change notification settings - Fork 156
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 code fix for wildcard _ in pattern match for fs43 on |-> #1157
base: main
Are you sure you want to change the base?
add code fix for wildcard _ in pattern match for fs43 on |-> #1157
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.AddMissingWildcardOperator
insrc/FsAutoComplete/CodeFixes/AddMissingWildcardOperator.fs
and its signature file insrc/FsAutoComplete/CodeFixes/AddMissingWildcardOperator.fsi
(link, link)CodeFix
type and theSyntaxVisitorBase
andSyntaxTraversal
utilities (link, link)AdaptiveFSharpLspServer
type insrc/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs
(link)FSharpLspServer
type insrc/FsAutoComplete/LspServers/FsAutoComplete.Lsp.fs
(link)FsAutoComplete.Tests.CodeFixTests.AddMissingWildcardOperatorTests
intest/FsAutoComplete.Tests.Lsp/CodeFixTests/AddMissingWildcardOperatorTests.fs
(link)CodeFix
andDiagnostics
utilities (link)tests
function intest/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs
(link)