Skip to content

Commit 7c0404c

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents b5e05ff + 5e2c2e9 commit 7c0404c

File tree

1 file changed

+26
-14
lines changed

1 file changed

+26
-14
lines changed

Diff for: .github/CONTRIBUTING.md

+26-14
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ This means that some errors you encounter could be the cause of said 3rd party l
2020
We can't fix issues related to those. If you encounter errors with those, go to the respective repository/site and report the issue.
2121

2222
### 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.
2425
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.
2526

2627
### Follow the templates
@@ -38,8 +39,8 @@ Javadocs help developers to see what methods they can/should use and what those
3839
When adding Javadoc comments, follow this Styling choises.
3940

4041
#### 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 line with `<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).
4344

4445
**Example**:
4546
```java
@@ -52,18 +53,20 @@ For paragraphs, keep an empty line in between and then start the new line with a
5253
```
5354

5455
#### 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}`
5657

5758
Bad example: `{@link BotBlockAPI}`
5859
Good example: `{@link com.andre601.javabotblockapi.BotBlockAPI BotBlockAPI}`
5960

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}`
6366

6467
**Note**:
6568
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.)
6770

6871
#### param styling
6972
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.
7881
```
7982

8083
#### 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.
8388

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.
8590

8691
#### Other Styling
8792
Please make sure that all text is on the same vertical line (block).
8893
This means that when f.e. a `@return` is used, that you have to use two spaces after `@param` instead of one.
8994

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:
9297
```java
9398
/**
9499
* Adds "Bar" to the provided text.
100+
* <br>Will throw an error when not providing text.
95101
*
96102
* @param foo
97103
* The text that should get "Bar" added to it.
98104
*
99105
* @return The provided String with "Bar" added to it.
100106
*
107+
* @throws IllegalArgumentException
108+
* When the provided String is empty/null.
109+
*
101110
* @since v1.0.0
102111
*/
103-
public String getFooBar(String foo){
112+
public String getFooBar(String foo) throws IllegalArgumentException{
113+
if(foo.isEmpty())
114+
throw new IllegalArgumentException("foo may not be empty");
115+
104116
return foo + "Bar";
105117
}
106118
```

0 commit comments

Comments
 (0)