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.6.tar.gz (28.6 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.6-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for primula-0.6.tar.gz
Algorithm Hash digest
SHA256 e4685bd18b7dad36e328f6295364074d3c8f91d4b7b86c693faf95399950d5bd
MD5 5e55b12ebc9e7c43a05f75bff46e5396
BLAKE2b-256 b593bdb12fabb7af40e8739c6c31a8eff6040278464b34c7319bd4e4d8b8b123

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for primula-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e425bef839532f4572763520aacef92502c8ebe139e333d0eb3f3b87cb19621d
MD5 1b2d7f717fd9b7e67b954363382957b1
BLAKE2b-256 494834057fbf7ac3e8e4961d1d6a993665f0413a7180ebab0d376addbf6236ea

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