Wiki

Clone wiki

Holocore / Coding Standards

Overview

Holocore has strict coding standards, which helps maintain code readability and functionality. Nothing should be merged unless it follows the following standards.

Formatting

If unspecified, formatting does not matter.

General Formatting:

  • Indentation: Tabs instead of 4 spaces
  • Curly Brackets: Starting on the same line and ending on a new line.
  • Variables: Instantiated when declared, unless instantiation is inside an if-statement and the variable is required following the if-statement.
    • int myInt = 5;
    • int myInt; if (mycondition) { myInt = 3; } else { myInt = 5; }
  • Functions: Size-wise, keep the length within reason. Aim for 20-30 lines each, any more should probably be cut down.

Updated