mirror of
https://github.com/wled/WLED.git
synced 2025-04-25 23:37:18 +00:00
Update CONTRIBUTING.md - adding a hint to avoid force-pushing
This commit is contained in:
parent
3a5eb8c5d2
commit
cce5e8f811
@ -16,6 +16,20 @@ A good description helps us to review and understand your proposed changes. For
|
|||||||
|
|
||||||
Please make all PRs against the `0_15` branch.
|
Please make all PRs against the `0_15` branch.
|
||||||
|
|
||||||
|
### Updating your code
|
||||||
|
While the PR is open - and under review by maintainers - you may be asked to modify your PR source code.
|
||||||
|
You can simply update your own branch, and push changes in response to reviewer recommendations.
|
||||||
|
Github will pick up the changes so your PR stays up-to-date.
|
||||||
|
|
||||||
|
> [!CAUTION]
|
||||||
|
> Do not use "force-push" while your PR is open!
|
||||||
|
> It has many subtle and unexpected consequences on our github reposistory.
|
||||||
|
> For example, we regularly lost review comments when the PR author force-pushes code changes. So, pretty please, do not force-push.
|
||||||
|
|
||||||
|
|
||||||
|
You kan find a collection of very usefull tips and tricks here: https://github.com/Aircoookie/WLED/wiki/How-to-properly-submit-a-PR
|
||||||
|
|
||||||
|
|
||||||
### Code style
|
### Code style
|
||||||
|
|
||||||
When in doubt, it is easiest to replicate the code style you find in the files you want to edit :)
|
When in doubt, it is easiest to replicate the code style you find in the files you want to edit :)
|
||||||
@ -37,6 +51,11 @@ if (a == b) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
if (a == b) doStuff(a);
|
||||||
|
```
|
||||||
|
|
||||||
|
Acceptable - however the first variant is usually easier to read:
|
||||||
```cpp
|
```cpp
|
||||||
if (a == b)
|
if (a == b)
|
||||||
{
|
{
|
||||||
@ -44,9 +63,6 @@ if (a == b)
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
```cpp
|
|
||||||
if (a == b) doStuff(a);
|
|
||||||
```
|
|
||||||
|
|
||||||
There should always be a space between a keyword and its condition and between the condition and brace.
|
There should always be a space between a keyword and its condition and between the condition and brace.
|
||||||
Within the condition, no space should be between the parenthesis and variables.
|
Within the condition, no space should be between the parenthesis and variables.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user