vim-dutyl
vim-dutyl copied to clipboard
Visual coverage analysis
I think an integration with DUB to run coverage analysis and display the results visually within vim would be very useful. Preferably it could co-exist with plugins such as vim-gitgutter and syntastic.
Dutyl relies on the uniformity of dub describe
to extract the paths for source files, imports and string imports. But doing coverage tests with DUB is not that uniform - you need to change the DUB file to add a configuration that does coverage tests, and it doesn't have a uniform default name.
So, I can't just run a DUB command and expect to get the coverage - not unless I edit the DUB file, which is not something I want to do from within Dutyl. I also don't want to run coverage analysis from Dutyl, since it's a very long operation and Dutyl doesn't have async facilities...
Dutyl, however, can provide the paths from DUB to other plugins. @joakim-brannstrom was working on doing so for syntactic almost a year ago. No idea if he is still interested in it though...
Hello,
yes, the natural progression after successfully integrating vim-dutyl with syntastic. I just never got around to finish the PR's to syntastic and vim-dutyl. "Works! Time to use it!"
My work can be found at: https://github.com/joakim-brannstrom/syntastic/tree/dmd_cov_support Has to be used together with my syntastic branch of vim-dutyl: https://github.com/joakim-brannstrom/vim-dutyl/tree/syntastic-cov-int
Does it do what you need?
I think that at least for files with a module
statement, it should be possible to pair the coverage tests with source files one to one. The output format for the coverage seems to be <source-directory>-<module>.lst
when run with dub test --coverage
. I don't know if the coverage tests can be directed to target only affected files, so the async thing might be an issue for large projects. How difficult is it to make use of neovim if it exists?
Hi @joakim-brannstrom, I'll check it out! Thanks for the work!