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

RemovePatternArgument quick fix #1142

Merged

Conversation

edgarfgp
Copy link
Contributor

@edgarfgp edgarfgp commented Jul 12, 2023

WHAT

🤖 Generated by Copilot at cd11d4d

This pull request adds a new code fix for removing unnecessary arguments in pattern matching expressions. The code fix is implemented in the RemovePatternArgument module and is triggered by compiler diagnostics with codes 725 or 3191. The code fix is registered by both the AdaptiveFSharpLspServer and the FSharpLspServer types, so that it can be used by different language server protocol clients. The pull request also includes tests for the code fix in the FsAutoComplete.Tests.Lsp project.

🤖 Generated by Copilot at cd11d4d

RemovePatternArgument
Code fix for F# patterns
Autumn leaves unused

🧹🔬🧩

WHY

Closes #1034

HOW

🤖 Generated by Copilot at cd11d4d

  • Add a new code fix for removing unnecessary arguments in pattern matching expressions (link)
  • Register the new code fix with the two language server types that provide language server protocol features for F# (link, link)
  • Add a new function with test cases for the new code fix in the test file test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs (link, link)

@TheAngryByrd
Copy link
Member

❤️ Thank you for this!

@TheAngryByrd TheAngryByrd merged commit f6b3c97 into ionide:main Jul 14, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quick fix for removing _ when using a union case with not data
2 participants