Skip to main content

A code coverage tool for Vim script

Project description

Primula is a code coverage tool for Vim script.

https://img.shields.io/pypi/v/primula https://github.com/hattya/primula/actions/workflows/ci.yml/badge.svg https://ci.appveyor.com/api/projects/status/if338u3j55a8kekm?svg=true https://codecov.io/gh/hattya/primula/branch/master/graph/badge.svg

Installation

$ pip install primula

Requirements

  • Python 3.9+

  • coverage 5.0+

  • Vim 7.4+

Usage

run

$ primula run vim --clean -Nnu vimrc -S /path/to/script.vim -c q
$ primula report -m

The contents of vimrc as follow:

if $PROFILE !=# ''
  execute 'profile start' $PROFILE
  profile! file ./*
endif

combine

$ vim --clean -Nn --cmd "profile start profile.txt" --cmd "profile! file ./*" -S /path/to/script.vim -c q
$ primula combine profile.txt
$ primula report -m

Configuration

.coveragerc

[primula]
environ = PROFILE
profile = profile.txt
cond

It controls whether following condition commands to be included as statements.

  • :elsei[f]

  • :cat[ch]

  • :fina[lly]

They are counted by Vim 8.1.309+.

Default: True

end

It controls whether following end commands to be included as statements.

  • :en[dif]

  • :endw[hile]

  • :endfo[r]

  • :endt[ry]

  • :endf[unction]

Default: False

environ

An environment variable name.

Default: PROFILE

profile

A profile output path.

Default: profile.txt

License

Primula is distributed under the terms of the Apache License, Version 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

primula-0.5.tar.gz (26.2 kB view details)

Uploaded Source

Built Distribution

primula-0.5-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file primula-0.5.tar.gz.

File metadata

  • Download URL: primula-0.5.tar.gz
  • Upload date:
  • Size: 26.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for primula-0.5.tar.gz
Algorithm Hash digest
SHA256 97bac3656f103888936b74eef40d39a134143aec1a30e30e20b82f5faa8e4118
MD5 c5db5384c6a749246a85018fb0f7d31b
BLAKE2b-256 00064ee1980c81b0fcd93b8bb994184973506e5b04c5fefdbc2399a8ad2b8357

See more details on using hashes here.

File details

Details for the file primula-0.5-py3-none-any.whl.

File metadata

  • Download URL: primula-0.5-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for primula-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 60928ee20c101963d3baac41842e5eeb2782902fee01437a7b3f9d213590d318
MD5 18d1f38c7c33285f628d32f72c22d942
BLAKE2b-256 c448c70aa34e32d0b3b3948ba30252a8225387d1d40d6505422a26eba833a936

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page