You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+23-15Lines changed: 23 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,43 +2,43 @@
2
2
[Code of Conduct]: https://github.com/botblock/JavaBotBlockAPI/blob/master/CODE_OF_CONDUCT.md
3
3
[BotBlock API]: https://botblock.org/api/docs
4
4
5
-
##Contributing Guidelines
5
+
# Contributing Guidelines
6
6
We welcome everyone to contribute to the JavaBotBlockAPI project.
7
7
But to keep a certain order and style over the project do you have to follow those guidelines here. But don't worry! They're fairly simple.
8
8
9
-
##Issues
9
+
# Issues
10
10
If you encounter problems with the API feel free to open an issue on the [issues] tab.
11
11
But before doing so make sure to check for the following things.
12
12
13
-
###Using latest version
13
+
## Using latest version
14
14
We do not support old versions of this API. We release new versions to fix issues, update dependencies or add new methods.
15
15
So if you encounter an issue or want a feature to be added, make sure to use the latest version as it might contain new functions and/or bugfixes.
16
16
17
-
###Make sure it is not an issue of external (3rd party) libraries
17
+
## Make sure it is not an issue of external (3rd party) libraries
18
18
JavaBotBlockAPI uses different 3rd party libraries such as JDA and also depends on the [BotBlock API].
19
19
This means that some errors you encounter could be the cause of said 3rd party libraries or sites not working as intended.
20
20
We can't fix issues related to those. If you encounter errors with those, go to the respective repository/site and report the issue.
21
21
22
-
###Issue doesn't already exist
22
+
## Issue doesn't already exist
23
23
Before creating an issue, make sure that you checked the issues page for any existing issue of the same type.
24
24
If one exists, comment on it and provide additional informations.
25
25
The best way for us to fix errors and issues is by gathering informations to find out why those issues happen. And having multiple issues complaining about the same issue won't help anyone here and only slows the process of fixing it down.
26
26
27
-
###Follow the templates
27
+
## Follow the templates
28
28
We have templates in place to make sure we receive the required informations.
29
29
Please follow those templates or else your issue might get ignored and closed.
30
30
31
31
----
32
-
##Pull Requests
32
+
# Pull Requests
33
33
We accept pull requests for fixing issues or adding new features, but you have to follow those rules.
34
34
35
-
###Javadocs
35
+
## Javadocs
36
36
Please add javadocs comments to **all public methods the developer has access to and should use.**
37
37
Javadocs help developers to see what methods they can/should use and what those do.
38
38
39
39
When adding Javadoc comments, follow this Styling choises.
40
40
41
-
####Line breaks and paragraphs
41
+
### Line breaks and paragraphs
42
42
Start a new line with `<br>` (Don't close this tag).
43
43
Do the same for new paragraphs, but keep an empty line in between the text (And of course use `<p>` instead).
44
44
@@ -52,7 +52,7 @@ Do the same for new paragraphs, but keep an empty line in between the text (And
52
52
*/
53
53
```
54
54
55
-
####Links
55
+
### Links
56
56
Please always use the full path to a class/method when using `{@link}`
57
57
58
58
Bad example: `{@link BotBlockAPI}`
@@ -70,7 +70,7 @@ New external javadocs may need to be added to the `javadoc` task in the `build.g
70
70
Use the `<a href="">` option to link external pages. When doing so also remember to include `target="_blank"`.
71
71
A link could look like this: `<a href="https://google.com" target="_blank">Google it!</a>` (You have to close the a tag.)
72
72
73
-
####param styling
73
+
### param styling
74
74
When the method has parameters, you have to set a description with the `@param` option.
75
75
Note that the description has to be on a new line.
76
76
@@ -82,19 +82,26 @@ Note that the description has to be on a new line.
82
82
*/
83
83
```
84
84
85
-
####Since
85
+
### Since
86
86
Since annotations are used to mention since what version a method/class is available.
87
87
The syntax is `@since v{major}.{minor}.{build}` where `{major}` is only changed on huge changes (Entire recodes f.e.), `{minor}` is updated on bigger changes of classes and similar and `{build}` is changed on every other noteworthy change.
88
88
89
89
In most cases will you only update `{build}` and nothing else. If you're unsure if you can/should update the version, ask a maintainer of this repository for assistance.
90
90
91
91
Please **do not change already existing since annotations**. This also includes adding ones to already existing methods/classes.
92
92
93
-
#### Other Styling
93
+
### Deprecated methods
94
+
If you're deprecating a method will you need to add the `@Deprecated` annotation and also include a `@deprecated` tag in the comment explain why it was deprecated and mention possible replacements.
95
+
96
+
You also need to add the `@DeprecatedSince` annotation to indicate since when a method is deprecated. This annotation has a required version field and an optional replacements field.
97
+
You may also add the `@PlannedRemoval` annotation if the object is planned to be removed in a future release. This annotation has a required version field, which indicate in what version the object will be removed.
98
+
The specified version has to be at least 2 versions away from the one that the object got deprecated in (i.e. deprecating a method in `5.2.0` will require you to set the version to at least `5.2.2` in the `PlannedRemoval` annotation).
99
+
100
+
### Other Styling
94
101
Please make sure that all text is on the same vertical line (block).
95
102
This means that when f.e. a `@return` is used, that you have to use two spaces after `@param` instead of one.
96
103
97
-
####Order of the parts
104
+
### Order of the parts
98
105
Here is an example of the different parts being used:
99
106
```java
100
107
/**
@@ -114,7 +121,8 @@ Here is an example of the different parts being used:
114
121
* @deprecated Use {@link #getFooBar() getFooBar()} instead.
115
122
*/
116
123
@Deprecated
117
-
@DeprecatedSince({"v1.0.1", "#getFooBar"}) // If you deprecate a method, add this one too.
124
+
@DeprecatedSince(version="1.0.0", replacements= {"#getFooBar"}) // If you deprecate a method, add this one too.
125
+
@PlannedRemoval(version="1.0.2") // When the objects gets removed in the future, add this annotation.
0 commit comments