`develop` and `master` branches are protected. This means that one cannot `push` on them, so **before** to do any code change one has to create a working branch. The following conventions are greatly encouraged:
*`feature/my_outstanding_feature`
*`issue/issue-number` (if no number is related to the issue please consider [opening an issue](https://gitlab.delpinux.fr/code/pastis/issues) and assign it to yourself)
----
## Tests and coverage
### Running tests
Tests are built automatically and are run typing
> `make test`
**all tests should be running correctly before any merge request**
### Unit tests
Unit tests are defined in the `tests` directory. New unit tests should be written or updated when needed.
### Coverage
Preferably, one should install [gcovr](http://www.gcovr.com) and build `pugs` specifying the `Coverage` build type
> `cmake -DCMAKE_BUILD_TYPE=Coverage [...]`
However coverage is computed at each `push` by the `gitlab-ci`.
----
## Coding
### `packages` directory
Do not make **any** change in the `packages` directory. This directory contains *third party libraries* that are are mandatory to minimal builds or `pugs`.
For any changes in this directory
(bug report, suggestion of new library, library upgrades or downgrades) **open an issue**.
### Warnings
Try to avoid publishing sources that generates compilation warnings.
Also, avoid the use of `#warning` directives and prefer opening an issue.
`C++``[[deprecated]]` directive should also be avoid as much as possible.
### Comments
**Do not** comment deprecated code. It is `git`'s job to keep track of old versions.
Avoid commenting functions bodies:
* comments are likely to be deprecates
* if the code is not clear by itself comments will not help
`Doxygen` is to be used to comment functions in the header.
### Code formatting
`clang-format` is used in `pugs`, so install it and run
> `make clang-format` before any commit
A better solution is to configure your favored editor to perform formatting automatically. For instance `emacs` users should copy-past the following code to their `.emacs.el` init file.