Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 1.08 KB

CONVENTION.md

File metadata and controls

34 lines (27 loc) · 1.08 KB

Java Formatting Conventions

LanteaCraft follows a set of custom formatting conventions which must be ahered to.

Indentation and Lines

  • You must use tabs, not two or four spaces;
  • Lines may be no longer than 120 characters;
  • Documentation lines may be no longer than 80 characters.

Wrapping Rules

You can wrap text at any one of the following points:

  • after a comma; or
  • before an operator.

Imports

  • Wildcard imports are not permitted.

Identifiers

  • Identifiers should give meaningful names to methods, variables and fields;
  • You should not use Hungarian Notation or any other derivative in your identifier naming.

Language & Syntax

  • Do not use commas to group statements;
  • Do not use braces to hide the scope of local variables;
  • You may omit braces where only one statement occurs per block;
  • You may choose to include braces should they improve the clarity of the source;
  • All case statements inside a switch { } block are to be indented.