Skip to content
Richik SC edited this page Mar 19, 2019 · 4 revisions

The Green Machine is using the Google Java Style Guide with a minor modification to change the standard indent from 2 to 4 spaces. All other style questions can be answered through the above link.

The Google Java Style Guide also requires writing Javadoc for every public class and every public or protected member of a class.

Diff

From Google Java Style Guide § 4.2:

4.2 Block indentation: +2 +4 spaces

Each time a new block or block-like construct is opened, the indent increases by two four spaces. When the block ends, the indent returns to the previous indent level. The indent level applies to both code and comments throughout the block. (See the example in Section 4.1.2, Nonempty blocks: K & R Style.)

From Google Java Style Guide § 5.1:

5.1 Rules common to all identifiers

Identifiers use only ASCII letters and digits, and, in a small number of cases noted below, underscores. Thus each valid identifier name is matched by the regular expression \w+.

In Google Style, special prefixes or suffixes are not used, unless those prefixes are essential to the variable name and do not simply denote type, such as x and y prefixes. For example, these names are not Google Style: name_, mName, s_name and kName, however, these names are allowed: xCoord, yPos.

Table of Contents

Clone this wiki locally