
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
covimerage
Advanced tools
Generates code coverage information for Vim scripts.
It parses the output from Vim's :profile command, and generates data
compatible with Coverage.py.
You can install covimerage using pip:
pip install covimerage
You can use covimerage run to wrap the call to Neovim/Vim with necessary
boilerplate:
covimerage run vim -Nu test/vimrc -c 'Vader! test/**'
This will write the file .coverage_covimerage by default (use --data-file
to configure it), which is compatible with Coverage.py.
A report is automatically generated (on stdout).
You can then call covimerage xml to create a coverage.xml file
(Cobertura-compatible), which tools like Codecov's
codecov tool can consume, e.g. via codecov -f coverage.xml.
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.
covimerage write_coverage /tmp/vim-profile.txt
This will create a file .coverage_covimerage (the default for --data-file),
with entries marked for processing by a
Coverage.py plugin (provided by
covimerage)).
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
data_file = .coverage_covimerage
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.
Neomake is the first adopter of this. It has an advanced test setup (including Docker based builds), and looking at tis setup could be helpful when setting up covimerage for your plugin/project.
Coverage information for a function may get wiped if the function is re-defined after testing it. This is a known limitation that does not depend on the implementation of covimerage, but on the vim profiler itself, since profiling data for a function, used to extract coverage data, is reset when the function is re-defined, even if the definition is identical.
This can be an issue if the source files being checked for coverage are
reloaded with runtime between tests for some reasons, e.g. when mocking some
function. To prevent coverage information from being lost, one solution is to
write such tests in a different suite that is run separately, and combine the
coverage results with covimerage run --append.
FAQs
Generate coverage information for Vim scripts.
We found that covimerage demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.