Skip to content

Commit f4acf41

Browse files
committed
ContributingCode: Add note about webkit-patch format
1 parent 2ef8c2e commit f4acf41

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/Getting Started/ContributingCode.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ You can run `Tools/Scripts/check-webkit-style` to check whether your code follow
8282
If you use `Tools/Scripts/webkit-patch upload` to upload your patch,
8383
it automatically runs the style checker against the code you changed so there is no need to run `check-webkit-style` separately.
8484

85+
The style checker cannot automatically fix the code style issues it finds. Supposing your patch was already commited as HEAD of your PR branch, you can re-format the code and amend your patch, as shown below:
86+
87+
```shell
88+
Tools/Scripts/webkit-patch format -g HEAD
89+
git commit -a --amend --no-edit
90+
```
91+
92+
Then you can try `Tools/Scripts/webkit-patch upload` again.
93+
8594
Some older parts of the codebase do not follow these guidelines.
8695
If you are modifying such code, it is generally best to clean it up to comply with the current guidelines.
8796

0 commit comments

Comments
 (0)