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.8+

  • 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.4.tar.gz (26.2 kB view details)

Uploaded Source

Built Distribution

primula-0.4-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for primula-0.4.tar.gz
Algorithm Hash digest
SHA256 0f5666b64b5d142112af768eb480148aa15bffd3518b574af38127b48d2f562c
MD5 5d4711097c1f58ca35d1cb2922edeb3b
BLAKE2b-256 c2a362cab8ac8d9c5cdd639cdd11c2c5aacd4339ea28bc758c826f4ada25555f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: primula-0.4-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for primula-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8c02a16cf3e8246209aed11f3a9dde8cca4ac9a3adf6502a2a9cb3ad90d867aa
MD5 8367f353f66b523b8aa95197f5b64ae1
BLAKE2b-256 2c3c58c1060a5bea71035cc3aa7a55f6cb3089a820bd4c3ffdd1f524d643630c

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