-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/AlexProgrammerDE/SoulFire
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 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,21 @@ | ||
# Contributing to SoulFire | ||
|
||
Thank you for considering to contribute to SoulFire! Please read the following paragraphs about how to edit your code style | ||
|
||
## Code style | ||
|
||
This project uses the google-java-format loosely. While most recommended options are enforced, some others are not. | ||
As a rule of thumb, if your IDE would spit the same code out with the "Reformat" task, it should be fine. | ||
|
||
To setup the google java format, please read the official page and follow the instructions for your IDE: | ||
https://github.com/google/google-java-format | ||
|
||
### Var keyword | ||
|
||
SoulFire exclusively uses the var keyword instead of explicitly declaring field types. | ||
That also includes types like `Map<String> map = new HashMap<>()`, those should be abbreviated to `var map = new HashMap<String>()` | ||
|
||
### IntelliJ inspections | ||
|
||
If you use IntelliJ you can import the file `config/checkstyle/checkstyle.xml` under `Settings -> Editor -> Code Style`. | ||
You can also import the recommended inspections at `config/intellij_inspections.xml` at `Settings -> Editor -> Inspections`. |