Skip to content
Johannes Bachhuber edited this page Jul 25, 2017 · 8 revisions

Introduction

We follow the Google Java Style Guide for our Java code. Here is a brief summary of the most important points:

General

Braces

Misc

  • Must use one blank line between methods
  • Can use blank line(s) to group fields
  • Can use blank lines(s) to group statements
  • Note: Don't use more than two consecutive blank lines
  • Use a space between keywords and braces
  • Use a space around binary or ternary operators
  • After ,:; (unless it's a trailing space)

IDE settings

The repository has a .editorconfig with indentation settings that should be supported by most IDEs. If you are using IntelliJ IDEA, the config files in the .idea directory should already configure the defaults correctly to adhere to the code style by default. You can reformat code in a file by pressing cmd + alt + L.

Clone this wiki locally