The following are few guidelines and answers intended for contributors
you can contribute by making one of those:
Bugs are reported at the issue tracker
If you think you found a bug:
- Check the issue tracker
- If you did find a relevant post about the problem: bring details or an upvote (even in closed issue)
- if you didn't find a relevant post then you can create a new issue
- The title should be relevant, explaining the problem in few words, avoid uppercases letters
- The issue should be very detailed, explaining how to reproduce the bug, containing anything that you think useful in order to fix it
Features are also welcome but there are few things to take into account.
- Features are also tracked here, check it before suggesting a feature in order to avoid duplicates.
- Features should be relevant to the Moe library, you don't want to see a machine-learning library with a built-in currency converter
- Feature suggestions are discussions, but don't depend on a general agreement
Code contributions are more than welcome!
- Check for duplicates here
- Use pull requests in order to submit a change
- Follow code style guidelines
- Dependencies should be optional (#define / CMake Option)
- Commit on a disctinct branch
- If your contribution fix an issue, it should preferably only fix one or closely related ones
- Explain and comment your code
The following is the coding style used in Moe
Variables naming is in lowerCamelCase
unsigned int moesCount;
we need a basic style to start with
Members variables are also written in lowerCamelCase, but have a 'm_' prefix
std::string m_id;
to distinguish them from function-scoped variables
Arguments have a '_' prefix
void run( unsigned int _generations );
to distinguish them from members, notably in setters
Then classes are written in UpperCamelCase, with first public members then private members
class UltraPowerfulAlgorithm : public PowerfulAlgorithm
{
public:
void run( unsigned int _generations );
private:
unsigned int m_generations;
};
note braces placement
Indentations should be 4-space long
also if you have multiple variables declarations:
unsigned int m_moesPerGen;
unsigned int m_generations;
should be
unsigned int m_moesPerGen,
m_generations;
- Keep naming simple: 3 words max
- There is no file naming rule
- No forward-declaration
- Keep header-only
- Keep dependency-free (or optional dependencies)
- Keep platform independent
Parsing the source in order to be confident with the coding style is recommended.