From 7ffebf476a1d8ddbcbc7f125921dddfe4a6c6000 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sat, 14 Dec 2013 05:26:43 -0500 Subject: [PATCH] Add contributing guidelines --- CONTRIBUTING.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 ++++ 2 files changed, 62 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f94d40a --- /dev/null +++ b/CONTRIBUTING.md @@ -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`. + +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. diff --git a/README.md b/README.md index 7d4e270..edca813 100644 --- a/README.md +++ b/README.md @@ -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 `. +## 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.