Contribution guidelines

First off, thank you very much for your interest in contributing to the Star-Phor project.

All types of contributions are welcome and valued for star-phor, star-phor-input and for this wiki itself.

Bug reports

Before reporting a bug, please verify that you are using the last publish version.

If you have found a bug, you can report it using the star-phor mailing list. Please try to be as descriptive as possible when filing a report and provide all relevant details. Ideally, developers should be able to reproduce your issue in their machine.

Patches

If you have modified star-phor and you think that your changes could be useful to other users, you can submit a patch with your modifications. To generate a patch, you can use the git format-patch command. To submit it to the maintainers, simply send it to the star-phor mailing list.

Code style

The star-phor project does not enforce a formal code style, but follows some conventions. The most important aspect is consistency, and the codebase itself is the best reference. Note that developers tend to be more explicit in star-phor. We also use yoda conditions. If you are a vim user, we provide a custom .vimrc that automatically handles line breaks, comment formatting and other aspects of the code style. You can download this file here.

General guidelines

C Files structure

Blocks

Functions

Variables

Preconditions

Error handling

Star-Phor uses the res_T type, provided by the rsys library, to handle errors. When calling functions that return an error status, check the return value:

res = some_function(arg, &out);
if (RES_OK != res) { goto error; }

The exit label handles cleanup and returns res. The error label performs any error-specific fixup (such as nulling output pointers and freeing the memory) and then falls through to exit.

Text length

Commits and Commit messages

Please try to respect the one-change-per-commit rule.

Provide a clear and descriptive commit message. Commit messages are expected to follow the form

subject [linebreak]
[linebreak]
commit message

Both the subject and the commit message should be wrapped to 72 characters.