Skip to content

Commit

Permalink
Add section about pull requests to contribution guide (CnCNet#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rampastring authored and SadPencil committed Oct 4, 2024
1 parent ac8bfcd commit dc31efb
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ Wrong:
Added null-check for GameMode
```

### Pull Requests

Make sure that the scope of your pull request is well defined. Pull requests can take significant developer time to review and very large pull requests or pull requests with poorly defined scope can be difficult to review.

One pull request should _only implement one feature_ or _fix one bug_, unless there is a good reason for grouping the changes together.

Do not heavily refactor the style of existing code in a pull request, unless the refactored code fits to the scope of the pull request (feature or bug fix). Rather, if you want to refactor existing code just for the sake of refactoring or getting rid of technical debt, create a secondary pull request for that purpose.

**Make sure your code and commits match this style guide before you create your pull request.**

Pull requests that are not well defined in their scope or pull requests that don't match the style guide can end up rejected and closed by the staff.

### Code style guide

We have established a couple of code style rules to keep things consistent. Please check your code style before committing the code.
Expand All @@ -41,7 +53,7 @@ if (SomeReallyLongCondition() ||
DoSomethingMore();
}
```
- Braceless code block bodies should be made only when both code block head and body are single line, statements split into multiple lines and nested braceless blocks are not allowed within braceless blocks:
- Braceless code block bodies should be made only when both code block head and body are single line. Statements that split into multiple lines and nested braceless blocks are not allowed within braceless blocks:
```cs
// OK
if (Something())
Expand Down

0 comments on commit dc31efb

Please sign in to comment.