Add section about LDoc in the contributing guide.

This commit is contained in:
Julian Wollrath 2015-02-26 12:09:17 +01:00 committed by Daniel Hahler
parent 5b69d8c5dd
commit a65affe9d0
1 changed files with 33 additions and 0 deletions

View File

@ -40,6 +40,39 @@ Imitate the existing code style. For concrete rules:
A vim modeline is set in each file to respect this.
### Documentation of lua files
For documentation purposes LDoc---see
[here](https://stevedonovan.github.io/ldoc/manual/doc.md.html) for its
documentation---is used. Comments, that shall be parsed by LDoc have the following format:
--- summary.
-- Description; this can extend over
-- several lines
-----------------
-- This will also do.
--[[--
Summary. A description
...;
]]
One can use the full power of [Markdown](http://daringfireball.net/projects/markdown)
with the extensions of [Discount](http://www.pell.portland.or.us/~orc/Code/discount/)
for mark-up in the comments.
Every module and class should have a short description at its beginning which
should include `@author author`, `@copyright year author`,
`@release @AWESOME_VERSION@` and `@module module-name` or `@classmod class-name`.
Parameters of functions should be documented by `@param parameter description`,
return values via `@return description` or `@treturn type description`. For a
more comprehensive description of the available tags see the
[LDoc documentation](https://stevedonovan.github.io/ldoc/manual/doc.md.html).
In addition to the regular tags provided by LDoc there are also some aliases for
tags defined in `docs/config.ld`.
## Patches
If you plan to submit patches, you should follow the following guidelines.