forked from PaperMC/Velocity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Checker Framework integration (PaperMC#126)
- Loading branch information
Showing
106 changed files
with
1,167 additions
and
705 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Thanks for taking the time to submit a contribution to Velocity! Your support | ||
is greatly appreciated. | ||
|
||
In this document, we'll give you some tips on making it more likely your | ||
contribution will be pulled. | ||
|
||
# Setting up a development environment | ||
|
||
This isn't as difficult as you may be led to believe. All you need to do is | ||
clone the Velocity repository in your favorite IDE and have your backend test | ||
servers set up to run behind Velocity. | ||
|
||
# Actually working on the code | ||
|
||
It is strongly recommended that you are familiar with the Minecraft protocol, | ||
proficient with using Java, and have familiarity with the libraries used in | ||
Velocity (particularly [Netty](https://netty.io), [Google Guava](https://github.com/google/guava), | ||
and the [Checker Framework annotations](https://checkerframework.org/)). | ||
While you can certainly work with the Velocity codebase without knowing any | ||
of this, it can be risky to proceed. | ||
|
||
Velocity does not currently obey any one general code style at the moment. | ||
Plans are [in the works](https://github.com/VelocityPowered/Velocity/issues/125) | ||
to define the code style the project will follow. | ||
|
||
# Notes on the build | ||
|
||
To reduce bugs and ensure code quality, we run the following tools on all commits | ||
and pull requests: | ||
|
||
* [Checker Framework](https://checkerframework.org/): an enhancement to Java's type | ||
system that is designed to help catch bugs. Velocity runs the _Nullness Checker_ | ||
and the _Optional Checker_. | ||
* [Checkstyle](http://checkstyle.sourceforge.net/) (not currently in use): ensures | ||
that your code is correctly formatted. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
api/src/main/java/com/velocitypowered/api/event/EventHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
package com.velocitypowered.api.event; | ||
|
||
import org.checkerframework.checker.nullness.qual.NonNull; | ||
|
||
/** | ||
* Represents an interface to perform direct dispatch of an event. This makes integration easier to achieve with platforms | ||
* such as RxJava. | ||
*/ | ||
@FunctionalInterface | ||
public interface EventHandler<E> { | ||
void execute(@NonNull E event); | ||
void execute(E event); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.