From d32fbac69343067365ab25144861f93aa672bcdd Mon Sep 17 00:00:00 2001 From: Andreas Tacke Date: Sat, 9 Dec 2023 09:47:16 +0100 Subject: [PATCH] First draft of a CONTRIBUTING file with style guidelines --- CONTRIBUTING.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..8b31e57fd --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,68 @@ +# Contributing to CleverCoffee + +Thank you for considering contributing to the project. To ensure consistency and maintainability, please follow these style guidelines when submitting code changes. + +## Code Style Guidelines + +### Coding Standards + +- **Indentation**: Use 4 spaces for indentation. +- **Curly Braces**: Place opening curly braces on the same line as the statement. + ```cpp + // Example + if (condition) { + // code + } + else { + // code + } + ``` +- **Capitalization**: Follow C++ style capitalization. + ```cpp + // Example + int myVariable; + + void myFunction() { + // code + } + ``` +- **Operators**: Use spaces around operators. + ```cpp + // Example + int sum = a + b; + + if (x == y) { + // code + } + ``` + +### Code Organization + +**Blank Lines**: Include a blank line before and after a code block. + ```cpp + // Example + void functionA() { + // code + } + + void functionB() { + // code + } + ``` + +### Encapsulation + +**Separate Files or Classes**: Encapsulate significant code changes in separate header files or classes if applicable. This helps maintain a modular and organized codebase, improving readability and reusability. + +## Submitting Changes + +1. Fork the repository and create a new branch for your changes. +2. Ensure your code follows the outlined style guidelines. +3. Make sure to include clear commit messages explaining the purpose of the changes. +4. Open a pull request with a descriptive title and detailed information about the changes made. + +## Code Review Process + +All contributions will be reviewed to ensure compliance with the project's guidelines. Be prepared to address any feedback or suggestions for improvement during the review process. + +Thank you for your contributions to CleverCoffee!