You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
The Go code coverage disappears when typing a character. This is implemented in removeCodeCoverageOnFileChange in goCover.ts. I find this very annoying, since I want to run the code coverage and then go through it and update the unit tests to add the missing tests, but as soon as I type a character in the unit test, the coverage information disappears.
I suggest that the code coverage should be removed when a Go file is saved, rather than when a character is typed. After all, the comment in the source saying that the code coverage is stale when a file is changed is false. The code coverage only becomes stale when the change is committed to disk (and would thus affect the result of compilation).
Alternately, please provide an option to disable removeCodeCoverageOnFileChange.
My current workaround is to change the language of the unit test file(s) from Go to plain text so it doesn't trigger the problem and then change back to Go before running the tests. It's not very nice.
The Go code coverage disappears when typing a character. This is implemented in removeCodeCoverageOnFileChange in goCover.ts. I find this very annoying, since I want to run the code coverage and then go through it and update the unit tests to add the missing tests, but as soon as I type a character in the unit test, the coverage information disappears.
I suggest that the code coverage should be removed when a Go file is saved, rather than when a character is typed. After all, the comment in the source saying that the code coverage is stale when a file is changed is false. The code coverage only becomes stale when the change is committed to disk (and would thus affect the result of compilation).
Alternately, please provide an option to disable removeCodeCoverageOnFileChange.
My current workaround is to change the language of the unit test file(s) from Go to plain text so it doesn't trigger the problem and then change back to Go before running the tests. It's not very nice.