Skip to content

Commit dae7375

Browse files
committed
made the contributing guide more clear
1 parent b9112b8 commit dae7375

File tree

1 file changed

+46
-66
lines changed

1 file changed

+46
-66
lines changed

CONTRIBUTING.md

Lines changed: 46 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,84 @@
11
# Machine Contribution Guide
2-
Greetings! It's great to see that you have chosen to access this document.
3-
I hope you find it helpful.
4-
52
To begin with, we want to express our gratitude for your willingness to
6-
contribute to Machine project. Your participation is highly valued and
3+
contribute to Machine project. Every contribution is highly valued and
74
much appreciated!
85

96
### Requirements
10-
To begin with, we assume that you possess adequate knowledge in Java
11-
programming and have selected your preferred IDE.
12-
However, if you lack proficiency in Java programming, we recommend that
13-
you refer to the official [Java documentation](https://docs.oracle.com/en/java/).
14-
15-
Before continuing, please ensure that you have **JDK 17 and
16-
Kotlin** installed on your system.
17-
18-
Subsequently, to kickstart your contributions,
19-
you will require a few essential tools.
20-
While most of these tools come pre-installed with your IDE,
21-
some may require additional installation:
22-
- Gradle - *In case your IDE does not support Gradle,
23-
fret not, you can use the Gradle wrapper (gradlew or gradlew.bat)
24-
without the need for any installation or configuration.*
7+
- JDK 17
8+
- Gradle - *you can use the Gradle wrapper (gradlew or gradlew.bat)
9+
without the need for any installation or configuration*
2510
- Git
2611

27-
### Safety Rules
28-
- Contributions must not include any malicious code intended to cause harm to the user or their device.
29-
- Under no circumstances should contributions contain confidential tokens, passwords, personal API keys, GitHub tokens, or any similar sensitive information.
30-
- Contributions should avoid slowing or making the server unstable.
31-
3212
### General Information
33-
Adhere to the project's prescribed style guide,
34-
which is comprehensively detailed in the `STYLE_GUIDE.md` file.
35-
36-
It is imperative to test your modifications rigorously.
37-
Go beyond testing just your alterations; test for any possible
38-
side effects that may have unintentionally resulted from your changes and
39-
avoid the frustration of breaking existing functionality.
40-
41-
Finally, when you are ready to submit your pull request,
42-
kindly conform to the provided template.
13+
- Adhere to the project's style guide, which is comprehensively
14+
described in the `STYLE_GUIDE.md` file.
15+
- Test your modifications carefully, make sure they don't cause
16+
side effects that may cause unintentional behaviour.
17+
- Contributions must not include any malicious code intended to cause harm to
18+
the end-user and contain confidential tokens, passwords, personal API keys,
19+
or any similar information.
20+
- Finally, when you are ready to submit your pull request, make
21+
sure to follow the provided template.
4322

4423
#### Nullness
4524
All variables that are either not annotated or annotated with `@NotNull` are
46-
presumed to be non-null.
25+
expected to be non-null.
26+
Null value is allowed only for variables marked with `@Nullable`.
4727

48-
#### Other
28+
#### Recommendations
4929
- Prevent Stream API if not dealing with large collections of data, use classic loop instead.
5030

5131
### Specific Information
5232

5333
#### API
54-
The API is fashioned after its forerunners. It prioritizes brevity
55-
to ensure simplicity for novices, while still offering ample
56-
advanced features for more seasoned developers.
34+
The API is designed after its forerunners. It prioritizes simplicity to
35+
ensure ease for beginners, while offering enough advanced features for
36+
more experienced developers.
5737

58-
We derive inspiration for designing new APIs mainly from Bukkit,
59-
Sponge, Minestom, and Krypton, credits where credits due.
38+
We draw inspiration for the design of new APIs primarily from Bukkit,
39+
Sponge, Minestom, and Krypton.
6040

6141
The Machine API should be structured to evolve seamlessly
6242
with new Minecraft versions. You should always weigh the potential use cases
63-
against the prospective maintenance expenses. If the downsides outweigh the
64-
benefits, it is perhaps not worth pursuing. In addition, it is crucial to
65-
document your code thoroughly.
43+
against the maintenance expenses. If the downsides outweigh the
44+
benefits, it is most likely not worth implementing the idea.
45+
46+
Make sure that 100% of your API code is documented with the correct use of code
47+
contract annotations.
6648

67-
Plugin design should rely heavily on dependency injection,
68-
and avoid the use of static accessors wherever feasible.
69-
However, some exceptions may exist.
49+
Plugins should rely on dependency injection, and avoid the use of static
50+
accessors. Exceptions do exist, but make sure you discuss your idea of
51+
implementation with others first if you are not sure about the design choice.
7052

7153
#### Server
72-
The server is a bit more intricate than the API and does not impose
73-
many of the same strict requirements, but there are still some guidelines
54+
The server is more complex than the API and does not follow many of the
55+
same strict requirements, but there are still some guidelines
7456
that you should attempt to follow.
7557

76-
The server is not designed to maintain backward compatibility for its
77-
dependents as it would be prohibitively expensive to maintain and severely
78-
limit the ability to evolve across Minecraft versions.
58+
The server is not designed to maintain backwards compatibility as it would
59+
be expensive to maintain and severely limit the ability to evolve
60+
across Minecraft versions.
7961

80-
Moreover, when designing implementations, it is imperative to ensure that you:
81-
- Follow the API specification thoroughly.
82-
- Conduct comprehensive testing to ensure that your code operates
83-
precisely as intended.
62+
When designing implementations, ensure that you:
63+
- Follow the API specification.
64+
- Test it to make sure that your code operates as intended.
8465
- Avoid introducing any potentially problematic elements,
85-
such as unexpected exceptions.
66+
such as unexpected exceptions.
8667

8768
### Licensing
88-
In order to contribute code, it must be licensed under **GPLv3** by you.
89-
We assume that any code you contribute is either your own or that you
90-
have explicit permission to license it to us.
69+
In order to contribute code, it must be licensed under **GPLv3**;
70+
it is either your property, or you have express permission to provide
71+
and license it to us.
9172

9273
Third-party code may be accepted in the following circumstances:
9374
- It is under a compatible license and part of a public, freely-available resource.
9475
- You have been granted permission to include it.
9576

9677
### Lombok
97-
Throughout the project, we utilize [Lombok](https://projectlombok.org/)
98-
to minimize boilerplate code and enhance the readability of certain areas.
99-
If you intend to use Lombok in your commitments, it is essential that you
100-
use only annotations that do not modify how the code works, rather
101-
adds functionality and reduce extra code.
78+
Throughout the project, we use [Lombok](https://projectlombok.org/)
79+
to minimize boilerplate code and improve its readability.
80+
If you intend to use Lombok in your commitments, use only annotations
81+
that do not modify how the code works, rather reduce boilerplate code.
10282

10383
**Banned Lombok Features** *(Annotations can't be detected by checkstyle so make sure
10484
you don't use these in your code)*
@@ -114,7 +94,7 @@ you don't use these in your code)*
11494
| `@Helper` | Makes the code readability worse, doesn't really help much.
11595
| `@StandardException` | Makes the code readability worse, doesn't really help much.
11696

117-
Please be aware that we may choose to remove Lombok from the project
97+
Please be aware that we may decide to remove Lombok from the project
11898
at some point in the future. Therefore, avoid overusing it when it is unnecessary.
11999

120100
### Code Contract Annotations

0 commit comments

Comments
 (0)