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

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

primula-0.7-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: primula-0.7.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for primula-0.7.tar.gz
Algorithm Hash digest
SHA256 ff881cf687f14b2bbc8e334e770dfa1cdc42d7562117c77fd5ecb4b21f12e43b
MD5 5dea0a7181cc61cb0e96b3bc78e10ae8
BLAKE2b-256 2644a3dea868d775633ae6c8ae08c5247ac62020c294dfdb63ee1dc8191ae9b5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: primula-0.7-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for primula-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f41c40dddc21c3f60ce01b590b03bd2afea77af7eaef36965cc9ba4045e98a9c
MD5 e9ca9d25b573e3d05b386a60d60097aa
BLAKE2b-256 20ad738232d2deb95d0cdf77fde75e316f6aaacd840d95980b8b8916ad88e3c2

See more details on using hashes here.

Supported by

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