From 0c1e26ef51ccbc70039b7e16112ea38d8b4e6197 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sun, 15 Nov 2020 16:58:35 +0300 Subject: fix: update contributing document --- CONTRIBUTING.org | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'CONTRIBUTING.org') diff --git a/CONTRIBUTING.org b/CONTRIBUTING.org index f1bcbef..fc48f4c 100644 --- a/CONTRIBUTING.org +++ b/CONTRIBUTING.org @@ -37,9 +37,9 @@ For this particular project, please follow rules as described in [[https://githu If you see any inconsistencies with the style guide in the code, feel free to change these in a non-breaking way. If you've added new functions, each one must be covered with a set of tests. -For that purpose this project has special =test.fnl= module, that defines such macros as =assert*=, =assert-eq=, =assert-ne=, and =test=. -All tests must be created with the =test= macro, which automatically defines the test function and runs it afterwards. -All assertions in tests must be one with one of =assert-eq=, =assert-ne=, or =assert*= macros, as these provide human readable output in the log. +For that purpose this project has special =test.fnl= module, that defines such macros as =assert*=, =assert-not=, =assert-eq=, =assert-ne=, =deftest=, and =testing=. +Related tests should be grouped with the =deftest= macro, which defines a meaningful name for the test, and test itself must be defined within =testing= macros. +All assertions in tests must be one with one of =assert-eq=, =assert-ne=, =assert-not=, or =assert*= macros, as these provide human readable output in the log. When changing existing functions make sure that all tests pass. If some tests do not pass, make sure that these tests are written to test this function. @@ -47,13 +47,13 @@ If not, then, perhaps, you've broke something horribly. Before comitting changes you must run tests with =make test=, and all of the tests must pass without errors. Consider checking test coverage with =make luacov= and rendering it with your preferred reporter. -Makefile also has =luacov-console= target, which can be used to see coverage of lua code directly in the terminal. +Makefile also has =luacov-console= target, which can be used to see coverage of lua code directly in the terminal with [[https://github.com/spacewander/luacov-console][luacov-console]]. ** Writing documentation If you've added new code, make sure it is covered not only by tests but also with documentation. This includes writing documentation strings directly in the code, either by using docstring feature of the language, or by adding comments which begin with =DOC:= -Documentation uses org format because it is easy to convert it to all kinds of formats. +Documentation files use Org Mode format because it is easy to convert it to all kinds of formats. Please make sure to follow existing style of documentation, which can be shortly describing as: - One sentence per line. -- cgit v1.2.3