- Vim or neovim
Clone and pass the vcov/bin path to PATH environment.
- Take a profile by yourself.
" vimscript
profile start vim.profile
profile! file autoload/**/*.vim
" ...
- Transform vim profile into lcov info file by vcov.
$ vcov vim.profile # -> vim.profile.lcov.info
$ # or you can specify output file
$ vcov vim.profile -o lcov.info
- Send it by coverage tools or genhtml to see the result locally.
$ genhtml lcov.info
$ # open index.html in your favorite browser
Accepts multiple profiles.
$ vcov vim1.profile vim2.profile vim3.profile -o merged.info
$ vcov --help
Set below environment variables to change the behavior.
-
VCOV_VIM
: Vim/neovim executable path. ( default:vim
) -
VCOV_HOME
: The directory of this repository.
Recommended you use as newer version of vim as possible. Older versions of vim is not supported to produce the proper profile data. (Checked: Vim 8.2 or above, neovim v0.4.3 or above)
Also please use newer version of vcov.
GitHub Actions with coverallsapp/github-action
# Take profile to vim.profile
- name: Install vcov
run: git clone --depth 1 --branch v0.2.0 --single-branch https://github.com/LumaKernel/vcov $HOME/vcov
- name: Make coverage report
run: |
export PATH=$HOME/vcov/bin:$PATH
vcov --version
vcov vim.profile -o lcov.info
- name: Coveralls
uses: coverallsapp/github-action@master
with:
path-to-lcov: ./lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
# Take profile to vim.profile
- name: Install vcov
run: git clone --depth 1 --branch v0.2.0 --single-branch https://github.com/LumaKernel/vcov $env:USERPROFILE/vcov
- name: Make coverage report
run: |
$env:PATH = "$env:USERPROFILE/vcov/bin;$env:PATH"
vcov --version
vcov vim.profile -o lcov.info
- name: Coveralls
uses: coverallsapp/github-action@master
with:
path-to-lcov: ./lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
Any of patches, issues, and wiki pages are welcome !
- Work with the number of line hits.
- Based on
lcov(1)
, so you can usegenhtml(1)
to check the result.
-
Vimjas/covimerage
- Inspired by.
-
thinca/vim-themis
- The binary system is inspired by this.