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

Scaffold codefix #1158

Merged
merged 11 commits into from
Sep 6, 2023
Merged

Scaffold codefix #1158

merged 11 commits into from
Sep 6, 2023

Conversation

nojaf
Copy link
Contributor

@nojaf nojaf commented Sep 4, 2023

WHAT

🤖 Generated by Copilot at 3da98e3

This pull request adds a new build target for scaffolding code fixes for the FsAutoComplete project. It uses the Fantomas.Core package to format the generated F# code and updates the build project files accordingly. It also improves the readability and consistency of the ./build/Program.fs file.

🤖 Generated by Copilot at 3da98e3

Sing, O Muse, of the skillful build project, the work of many hands
That crafts the code and tests the tools, and helps the F# community
How they added ScaffoldCodeFix, a mighty and useful target
That generates the files and references for fixing errors with ease

✨📝🔨

WHY

HOW

🤖 Generated by Copilot at 3da98e3

  • Add ScaffoldCodeFix module and target to generate code fix files and update project references (link, link, link, F

Related to #1156.
I'm working on a FAKE target that scaffolds are the right files to write a new code fix.

See 194fe5d for an example of usage.

TODO:

  • Polish code.
  • Add documentation that this exists.
  • Ensure it keeps working over time.

@nojaf nojaf marked this pull request as ready for review September 5, 2023 11:03
@nojaf
Copy link
Contributor Author

nojaf commented Sep 5, 2023

I'm happy with this, please review it.
@jkone27 it would also be interesting to hear how much of the sample code (when you scaffold a code fix) makes sense.

Copy link
Member

@TheAngryByrd TheAngryByrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so amazing ❤️. This looks great, only tiny change request.

docs/Creating a new code fix.md Outdated Show resolved Hide resolved
@TheAngryByrd TheAngryByrd merged commit d8b0fec into ionide:main Sep 6, 2023
8 of 9 checks passed
nojaf added a commit to nojaf/FsAutoComplete that referenced this pull request Nov 3, 2023
* Initial scaffold of implementation file.

* Remove temporary code fix addition.

* Wire up codefixes to LSP servers.

* Add dedicated test file and wire tests.

* Sample of usage

* Revert "Sample of usage"

This reverts commit 194fe5d.

* Improve syntax tree traversal code.

* Add documentation.

* Ensure ScaffoldCodeFix keeps working.

* Don't indent code snippet.

* Add pointers for PR.
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.

2 participants