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

Improve xml doc command #1106

Merged
merged 1 commit into from
Apr 21, 2023
Merged

Improve xml doc command #1106

merged 1 commit into from
Apr 21, 2023

Conversation

dawedawe
Copy link
Contributor

@dawedawe dawedawe commented Apr 21, 2023

The cleaned up result of todays Amplify F# session. Fixes #1104

  • Don't add xml doc lines if there are already some doc lines present.
  • Work on all possible AST elements, not just the ones for which we get a result from TryGetSignatureData.

Adjust tests accordingly

WHAT

🤖 Generated by Copilot at ff2ee3d

This pull request improves the code fix feature for generating XML documentation for F# elements, by adding more cases, simplifying the code, and updating the tests. It affects the files src/FsAutoComplete.Core/Commands.fs, src/FsAutoComplete/CodeFixes/GenerateXmlDocumentation.fs, and test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs.

🤖 Generated by Copilot at ff2ee3d

A code fix for XML doc generation
Was enhanced with a new validation
It checks for AST elements
With empty comments and indents
And adds a summary for each declaration

📝🔧🧪

WHY

HOW

🤖 Generated by Copilot at ff2ee3d

  • Refactor the code fix feature for generating XML documentation to handle more kinds of AST elements and simplify the logic (link, link, link, link, link)
  • Move the FsAutoComplete.CodeFix.GenerateXmlDocumentation module from src/FsAutoComplete/CodeFixes/GenerateXmlDocumentation.fs to src/FsAutoComplete.Core/Commands.fs where the rest of the code fix features are defined (link)
  • Update the test cases for the code fix feature for generating XML documentation to reflect the new functionality and improve the clarity and completeness of the expected outputs (link, link, link, link, link, link, link, link, link, link)

- Don't add xml doc lines if there are already some doc lines present.
- Work on all possible AST elements, not just the ones for which we get a result from TryGetSignatureData.

Adjust tests accordingly
@baronfel
Copy link
Contributor

This LGTM - @TheAngryByrd any reason not to merge? We can do a release this weekend.

@baronfel baronfel merged commit f7b0b82 into ionide:main Apr 21, 2023
@dawedawe dawedawe deleted the fix_1104 branch April 21, 2023 15:53
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.

Enhancements to generated XML Doc codefixes
3 participants