thamara / vscode-code-annotation

Code Annotation Extension for VSCode
https://marketplace.visualstudio.com/items?itemName=tkcandrade.code-annotation
GNU General Public License v3.0
67 stars 27 forks source link

Generate markdown reporting without saving #28

Closed taismassaro closed 3 years ago

taismassaro commented 3 years ago

Closes #7

This PR refactors generateMarkdownReport to create an unsaved markdown file independent of a workspace, giving user control of where/whether to saved it.

It also fixes some linting issues that were there for some reason. 😬

thamara commented 3 years ago

I just noticed one strange-ish behavior. If you have the summary.md opened, and click to generate summary again, it will append the content to the previously generated file. I think for this it should be enough to use delete from WorkspaceEdit, passing the whole file range.

Would you mind addressing this behavior?

taismassaro commented 3 years ago

I just noticed one strange-ish behavior. If you have the summary.md opened, and click to generate summary again, it will append the content to the previously generated file. I think for this it should be enough to use delete from WorkspaceEdit, passing the whole file range.

Would you mind addressing this behavior?

I've seen there's also a replace method, but I'm struggling with getting the range of the file in the first place. :/

thamara commented 3 years ago

That looks tricky. Let me take a look at that and I'll get back to you. If it turns out too complicated right now, we can merge this PR and open an issue to track this bug. As the Extension is under development yet, I think that's totally acceptable. :)