Skip to content

Commit

Permalink
Update CONTRIBUTING.md - adding a hint to avoid force-pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
softhack007 committed Sep 10, 2024
1 parent 3a5eb8c commit cce5e8f
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

### 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

When in doubt, it is easiest to replicate the code style you find in the files you want to edit :)
Expand All @@ -37,16 +51,18 @@ if (a == b) {
}
```

```cpp
if (a == b) doStuff(a);
```

Acceptable - however the first variant is usually easier to read:
```cpp
if (a == b)
{
doStuff(a);
}
```

```cpp
if (a == b) doStuff(a);
```

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.
Expand Down

0 comments on commit cce5e8f

Please sign in to comment.