aboutsummaryrefslogtreecommitdiffhomepage
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2024-01-14 00:42:59 +0100
committerGitHub <[email protected]>2024-01-14 00:42:59 +0100
commit78fcb8e7663307931f932ad0087ee42d65a203de (patch)
treebed976d3c8f5c7821f973e1489e01d94134b2ba9 /CONTRIBUTING.md
parent17275ffd686939eca76cf1d339460d2cf910ce29 (diff)
downloadPaper-78fcb8e7663307931f932ad0087ee42d65a203de.tar.gz
Paper-78fcb8e7663307931f932ad0087ee42d65a203de.zip
[ci skip] Update contributing guidelines to include identifying commit titles in comments (#10162)
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md27
1 files changed, 14 insertions, 13 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2ee1459ced..b845f7dd0d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -206,27 +206,28 @@ when making and submitting changes.
All modifications to non-Paper files should be marked.
-- Multi-line changes start with `// Paper start` and end with `// Paper end`;
-- You can put a comment with an explanation if it isn't obvious, like this:
-`// Paper start - reason`.
- - The comments should generally be about the reason the change was made, what
- it was before, or what the change is.
- - Multi-line messages should start with `// Paper start` and use `/* Multi
- line message here */` for the message itself.
-- One-line changes should have `// Paper` or `// Paper - reason`.
+- You need to add a comment with a short and identifiable description of the patch:
+ `// Paper start - <COMMIT DESCRIPTION>`
+ - The comments should generally be about the reason the change was made, what
+ it was before, or what the change is.
+ - After the general commit description, you can add additional information either
+ after a `;` or in the next line.
+- Multi-line changes start with `// Paper start - <COMMIT DESCRIPTION>` and end
+ with `// Paper end - <COMMIT DESCRIPTION>`.
+- One-line changes should have `// Paper - <COMMIT DESCRIPTION>` at the end of the line.
Here's an example of how to mark changes by Paper:
```java
-entity.getWorld().dontbeStupid(); // Paper - was beStupid() which is bad
+entity.getWorld().dontBeStupid(); // Paper - Was beStupid(), which is bad
entity.getFriends().forEach(Entity::explode);
-entity.a();
-entity.b();
-// Paper start - use plugin-set spawn
+entity.updateFriends();
+
+// Paper start - Use plugin-set spawn
// entity.getWorld().explode(entity.getWorld().getSpawn());
Location spawnLocation = ((CraftWorld)entity.getWorld()).getSpawnLocation();
entity.getWorld().explode(new BlockPosition(spawnLocation.getX(), spawnLocation.getY(), spawnLocation.getZ()));
-// Paper end
+// Paper end - Use plugin-set spawn
```
We generally follow the usual Java style (aka. Oracle style), or what is programmed