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
+26-14
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,8 @@ This means that some errors you encounter could be the cause of said 3rd party l
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
22
### Issue doesn't already exist
23
-
Instead of creating a new issue explaining the same thing as the other one does, better go to the issue and comment on it to proof that it happens on multiple platforms.
23
+
Before creating an issue, make sure that you checked the issues page for any existing issue of the same type.
24
+
If one exists, comment on it and provide additional informations.
24
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.
25
26
26
27
### Follow the templates
@@ -38,8 +39,8 @@ Javadocs help developers to see what methods they can/should use and what those
38
39
When adding Javadoc comments, follow this Styling choises.
39
40
40
41
#### Line breaks and paragraphs
41
-
When making a new line, start the new line with `<br>`and __don't__ close it.
42
-
For paragraphs, keep an empty line in between and then start the new line with a `<p>`(Also don't close it)
42
+
Start a new linewith `<br>`(Don't close this tag).
43
+
Do the same for new paragraphs, but keep an empty line in between the text (And of course use `<p>`instead).
43
44
44
45
**Example**:
45
46
```java
@@ -52,18 +53,20 @@ For paragraphs, keep an empty line in between and then start the new line with a
52
53
```
53
54
54
55
#### Links
55
-
When linking to other classes or methods, use the full path to it in the `{@link}` option.
56
+
Please always use the full path to a class/method when using `{@link}`
56
57
57
58
Bad example: `{@link BotBlockAPI}`
58
59
Good example: `{@link com.andre601.javabotblockapi.BotBlockAPI BotBlockAPI}`
59
60
60
-
Note the alternative argument used in the good example.
61
-
A special case is used when linking to a method within the same class. In this case just link the method using #.
62
-
Example: `{@link #myMethod}`
61
+
We want to point out the alternative text used in the Good example, to display "BotBlockAPI" instead of the path.
62
+
When linking to a method that is in a separate classm, set the alternative text to `Class.method(option(s))`.
63
+
64
+
There is an exception for linking, when you link to a method in the same (inner) class.
65
+
In those cases just link to it by using `{@link #methodName}`
63
66
64
67
**Note**:
65
68
Use the `<a href="">` option to link external pages. When doing so also remember to include `target="_blank"`.
66
-
A link could look like this: `<a href="https://google.com" target="_blank">Google it!</a>` (You have to close it.)
69
+
A link could look like this: `<a href="https://google.com" target="_blank">Google it!</a>` (You have to close the a tag.)
67
70
68
71
#### param styling
69
72
When the method has parameters, you have to set a description with the `@param` option.
@@ -78,29 +81,38 @@ Note that the description has to be on a new line.
78
81
```
79
82
80
83
#### Since
81
-
When adding new methods to the API, will you need to add a `@since` annotation at the end containing the new version.
82
-
Usually do only big, breaking changes increase the minor number (`v{major}.{minor}.{build}`) so usually you only increase the build.
84
+
Since annotations are used to mention since what version a method/class is available.
85
+
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.
86
+
87
+
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.
83
88
84
-
Please do NOT edit any already existing `@since` annotation.
89
+
Please **do not change already existing since annotations**. This also includes adding ones to already existing methods/classes.
85
90
86
91
#### Other Styling
87
92
Please make sure that all text is on the same vertical line (block).
88
93
This means that when f.e. a `@return` is used, that you have to use two spaces after `@param` instead of one.
89
94
90
-
#### Example
91
-
Here is an example of a method with all parts:
95
+
#### Order of the parts
96
+
Here is an example of the different parts being used:
92
97
```java
93
98
/**
94
99
* Adds "Bar" to the provided text.
100
+
* <br>Will throw an error when not providing text.
95
101
*
96
102
* @param foo
97
103
* The text that should get "Bar" added to it.
98
104
*
99
105
* @return The provided String with "Bar" added to it.
0 commit comments