Add contributing guidelines

This commit is contained in:
Rapptz 2013-12-14 05:26:43 -05:00
parent 5341682503
commit 7ffebf476a
2 changed files with 62 additions and 0 deletions

58
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,58 @@
## Contributing to Sol
Looking to contribute to Sol? Well, first thing I want to mention is thank you!
Second of all, this is probably where you should look :)
## Reporting Issues
If you found a bug, please make sure to make an issue in the issue tracker.
The guidelines for reporting a bug are relatively simple and are as follows:
1. Produce a simple, short, compilable test case that reproduces your problem.
2. Make a descriptive title that summarises the bug as a whole.
3. Explain the bug in as much detail as you can in the body of the issue.
If you have all of those requirements set, then your issue reporting is golden.
## Submitting a pull request
Submitting a pull request is fairly simple, just make sure it focuses on a single aspect and doesn't
manage to have scope creep and it's probably good to go. It would be incredibly lovely if the style is
consistent to those found in the repository.
They are as follows (more will be added as they come up):
- No spaces between parentheses. e.g. `f(g())` not `f ( g ( ) )`.
- No tabs allowed. Use 4 space indentation.
- Bracing style is
```cpp
if(my_bool) {
}
else if(my_other_bool) {
}
else {
}
```
- Variable names follow those in the C++ standard, basically snake_case.
- Maximum column length is 125
- Trailing return type will always be in the same line. Even if it goes off the column length. e.g.
`auto f() -> decltype(/* my long expression */) {`
- Since this is a header-only library, all free functions must be marked `inline`.
- Use braces in optional contexts like `if`, `for`, `else`, `while`, etc. e.g.
```cpp
if(x > 12) {
return x * 2;
}
```
- Use `typename` instead of `class` for template parameters. e.g. `template<typename T>`.
If you don't meet all of these style guidelines, don't fret. I'll probably fix it. But please
do make an effort to actually meet them. Otherwise I'm more likely to reject the pull request.

View File

@ -11,6 +11,10 @@ Lua errors are thrown as exceptions instead. This allows you to handle the error
It should be noted that the library itself depends on `lua.hpp` to be found by your compiler. It uses angle brackets, e.g.
`#include <lua.hpp>`.
## Contributing
If you want to contribute, please check CONTRIBUTING.md for details. Thank you!
## Example
Here's an example on how to load a basic configuration struct with a Lua script.