-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First draft of a CONTRIBUTING file with style guidelines
- Loading branch information
Andreas Tacke
committed
Dec 9, 2023
1 parent
9f6d20a
commit d32fbac
Showing
1 changed file
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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! |