From d38a022654548d44122428f71dc8f0ebd7b34167 Mon Sep 17 00:00:00 2001 From: Peter Melnichenko Date: Wed, 29 Jun 2016 19:18:02 +0300 Subject: 0.12.0 release --- README.md | 64 +++++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 22 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index ce45ba3..8910e25 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,17 @@ page](https://github.com/keplerproject/luacov/releases). It can also be installed using Luarocks: - luarocks install luacov +``` +luarocks install luacov +``` + +In order to additionally install experimental C extensions that improve +performance and analysis accuracy install [CLuaCov] +(https://github.com/mpeterv/cluacov) package instead: + +``` +luarocks install cluacov +``` LuaCov is written in pure Lua and has no external dependencies. @@ -51,9 +61,9 @@ file named `luacov.report.out`. The script takes the following parameters: luacov [-c=configfile] [filename...] For the `-c` option see below at [configuration](#configuration). The filenames -(actually Lua patterns) indicate the files to include in the report, specifying them here -equals to adding them to the `include` list in the configuration file, with `.lua` -extension stripped. +(actually Lua patterns) indicate the files to include in the report, specifying +them here equals to adding them to the `include` list in the configuration +file, with `.lua` extension stripped. This is an example output of the report file: @@ -75,35 +85,44 @@ themselves). LuaCov saves its stats upon normal program termination. If your program is a daemon -- in other words, if it does not terminate normally -- you can use the -`luacov.tick` module, which periodically saves the stats file. For example, to -run (on Unix systems) LuaCov on -[Xavante](http://keplerproject.github.io/xavante/), just modify the first line of -`xavante_start.lua` so it reads: +`luacov.tick` module or `tick` configuration option, which periodically saves +the stats file. For example, to run (on Unix systems) LuaCov on +[Xavante](http://keplerproject.github.io/xavante/), just modify the first line +of `xavante_start.lua` so it reads: + +``` +#!/usr/bin/env lua -lluacov.tick +``` + +or add + +```lua +tick = true +``` - #!/usr/bin/env lua -lluacov.tick +to `.luacov` config file. ## Configuration LuaCov includes several configuration options, which have their defaults stored in `src/luacov/defaults.lua`. These are the global defaults. To use -project specific configuration, create a Lua script returning a table -with some options and store it as `.luacov` in the project directory from -where `luacov` is being run. For example, this config informs LuaCov that -only `foo` module and its submodules should be covered and that they are -located inside `src` directory: +project specific configuration, create a Lua script setting options as globals +or returning a table with some options and store it as `.luacov` in the project +directory from where `luacov` is being run. For example, this config informs +LuaCov that only `foo` module and its submodules should be covered and that +they are located inside `src` directory: ```lua -return { - modules = { - ["foo"] = "src/foo/init.lua", - ["foo.*"] = "src" - } +modules = { + ["foo"] = "src/foo/init.lua", + ["foo.*"] = "src" } ``` For a full list of options, see -[`luacov.defaults` documentation](http://keplerproject.github.io/luacov/doc/modules/luacov.defaults.html). +[`luacov.defaults` documentation] +(http://keplerproject.github.io/luacov/doc/modules/luacov.defaults.html). ## Custom reporter engines @@ -119,10 +138,11 @@ After cloning this repo, these commands may be useful: * `luarocks make` to install LuaCov from local sources; * `make test` to run tests (does not require installing beforehand); -* `ldoc .` to regenerate documentation using [LDoc](https://github.com/stevedonovan/LDoc). +* `ldoc .` to regenerate documentation using [LDoc] + (https://github.com/stevedonovan/LDoc). * `luacheck .` to lint using [Luacheck](https://github.com/mpeterv/luacheck). ## Credits LuaCov was designed and implemented by Hisham Muhammad as a tool for testing -[LuaRocks](http://www.luarocks.org). +[LuaRocks](https://luarocks.org/). -- cgit v1.2.1