Skip to content

Generate coverage information for Vim scripts.

License

Notifications You must be signed in to change notification settings

blueyed/covimerage

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

covimerage

Generates code coverage information for Vim scripts.

It parses the output from Vim's :profile command, and generates data compatible with Coverage.py.

NOTE: this develop branch will be squash-merged into master after some stabilization (1-2 weeks).

Build Status codecov

Installation

You can install covimerage using pip:

pip install covimerage

Usage

1. Generate profile information for your Vim script(s)

You have to basically add the following to your tests vimrc:

profile start /tmp/vim-profile.txt
profile! file ./*

This makes Neovim/Vim then write a file with profiling information.

2. Call covimerage on the output file(s)

covimerage write_coverage /tmp/vim-profile.txt

This will create a .coverage file (marking entries for processing by a Coverage.py plugin (provided by covimerage)).

3. Include the covimerage plugin in .coveragerc

When using coverage on the generated output (data file), you need to add the covimerage plugin to the .coveragerc file (which Coverage.py uses). This is basically all the .coveragerc you will need, but you could use other settings here (for Coverage.py), e.g. to omit some files:

[run]
plugins = covimerage

4. Create the report(s)

You can now call e.g. coverage report -m, and you should be able to use coverage reporting platforms like https://codecov.io/ or https://coveralls.io, which are basically using coverage xml.

Reference implementation

Links

TODO

About

Generate coverage information for Vim scripts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.4%
  • Vim Script 5.4%
  • Makefile 5.2%