-
Notifications
You must be signed in to change notification settings - Fork 12
Style Guide
tyrothalos edited this page Aug 18, 2016
·
1 revision
This document serves as a basic style guide for Civcraft. Anything not covered in this guide may be left to the author’s decision.
All files in all projects should be encoded in UTF-8.
The source files in a Civcraft project should be put into the following directories:
- Source files in
src/main/java/
- Resource files in
src/main/resources/
- Test source files in
src/test/java/
- Test resource files
src/test/resources/
All class fields should never be public with the exception of constants (immutable static final fields).
Class contents should be organized as follows:
- Fields
- Methods
- Getter and setter methods (this need not apply if Lombok is used)
- Inner classes (if there are any)
Tabs should be used for indentation while spaces should be used for alignment.
Consider using .editorconfig to help achieve this.
Lines must be no longer than 120 characters. Assume a tab width of 4 spaces.