-
Notifications
You must be signed in to change notification settings - Fork 0
Style
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.
From Google Java Style Guide § 4.2:
Each time a new block or block-like construct is opened, the indent increases by
twofour 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:
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
andkName
, however, these names are allowed:xCoord
,yPos
.
2019 FRC 1816 The Green Machine