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 +++++++----
doc/doc/index.html | 16 ++-
doc/doc/ldoc.css | 2 +-
doc/doc/modules/luacov.defaults.html | 44 ++++++--
doc/doc/modules/luacov.hook.html | 114 +++++++++++++++++++
doc/doc/modules/luacov.html | 9 +-
doc/doc/modules/luacov.reporter.html | 53 +++++++--
doc/doc/modules/luacov.runner.html | 15 +--
doc/doc/modules/luacov.stats.html | 6 +-
doc/doc/modules/luacov.tick.html | 6 +-
doc/doc/modules/luacov.util.html | 213 +++++++++++++++++++++++++++++++++++
doc/index.html | 52 ++++++++-
src/luacov/defaults.lua | 8 +-
src/luacov/runner.lua | 2 +-
14 files changed, 531 insertions(+), 73 deletions(-)
create mode 100644 doc/doc/modules/luacov.hook.html
create mode 100644 doc/doc/modules/luacov.util.html
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/).
diff --git a/doc/doc/index.html b/doc/doc/index.html
index 26c4d57..7871d24 100644
--- a/doc/doc/index.html
+++ b/doc/doc/index.html
@@ -33,10 +33,12 @@
@@ -54,7 +56,11 @@
luacov.defaults |
- Default configuration file. |
+ Default values for configuration options. |
+
+
+ luacov.hook |
+ Hook module, creates debug hook used by LuaCov. |
luacov.reporter |
@@ -73,13 +79,17 @@
Load luacov using this if you want it to periodically
save the stats file. |
+
+ luacov.util |
+ Utility module. |
+
-
generated by LDoc 1.4.3
-
Last updated 2016-04-18 11:50:47
+
generated by LDoc 1.4.4
+
Last updated 2016-06-29 18:46:30
+
+
+
+
+
+
+
+
+
+
+
+
+
+
LuaCov
+
+
+
+
Contents
+
+
+
+
Modules
+
+
+
+
+
+
+
Module luacov.hook
+
Hook module, creates debug hook used by LuaCov.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+ new (runner)
+
+ -
+ Creates a new debug hook.
+
+
+
Parameters:
+
+ - runner
+ runner module.
+
+
+
+ Returns:
+
+
+ debug hook function that uses runner fields and functions
+ and sets runner.data
.
+
+
+
+
+
+
+
+
+
+
+
+
+
generated by LDoc 1.4.4
+
Last updated 2016-06-29 18:46:30
+
+
+
diff --git a/doc/doc/ldoc.css b/doc/doc/ldoc.css
index 7a954f4..269f328 100644
--- a/doc/doc/ldoc.css
+++ b/doc/doc/ldoc.css
@@ -28,7 +28,7 @@ del,ins {
text-decoration: none;
}
li {
- list-style: disc;
+// list-style: disc;
margin-left: 20px;
}
caption,th {
diff --git a/doc/doc/modules/luacov.defaults.html b/doc/doc/modules/luacov.defaults.html
index 52bdc0e..c512c18 100644
--- a/doc/doc/modules/luacov.defaults.html
+++ b/doc/doc/modules/luacov.defaults.html
@@ -41,10 +41,12 @@
Module luacov.defaults
-
Default configuration file.
-
Copy, customize and store in your
- project folder as '.luacov' for project specific configuration.
- If some options are missing, their default values from this file
- will be used.
+
Default values for configuration options.
+
For project specific configuration create '.luacov' file in your project
+ folder. It should be a Lua script setting various options as globals
+ or returning table of options.
@@ -85,6 +86,10 @@
Filename to store report. |
+ tick |
+ Enable saving coverage data after every savestepsize lines? |
+
+
savestepsize |
Stats file updating frequency for luacov.tick. |
@@ -163,11 +168,10 @@
Usage:
- modules = {
- ["some_rock"] = "src/some_rock.lua",
- ["some_rock.*"] = "src"
- }
+
modules = {
+ ["some_rock"] = "src/some_rock.lua",
+ ["some_rock.*"] = "src"
+}
@@ -202,6 +206,22 @@
+
+
+
+ tick
+
+
+ Enable saving coverage data after every savestepsize lines?
+ Setting this flag to true
in config is equivalent to running LuaCov
+ using luacov.tick module. Default: false.
+
+
+
+
+
+
+
@@ -271,8 +291,8 @@
diff --git a/doc/doc/modules/luacov.hook.html b/doc/doc/modules/luacov.hook.html
new file mode 100644
index 0000000..2c8ce8a
--- /dev/null
+++ b/doc/doc/modules/luacov.hook.html
@@ -0,0 +1,114 @@
+
+
+
+