Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 1.7 KB

TechnicalReference.md

File metadata and controls

21 lines (14 loc) · 1.7 KB

VisibleSim Technical Reference

This technical reference sheet should be used as a starting point for anyone who is interested in contributing to VisibleSim. It details how the repository is organised, attempts to clearly outline the software's architecture, and provides new contributors with everything they need to know about the coding style to adopt.

Coding Style

The following rules should be taken into account when contributing new source code to VisibleSim, as they are the coding practises used on existing code, and homogeneous coding style makes it a lot easier to understand the project's sources.

Whitespace and Indentation

Indentation size is at 4 spaces per logic level. No tabs. No trailing whitespace at the end of a line. Newline characters should be UNIX style (use \n, not \r\n).

Warning: There is no additional indentation inside a Namespace logical unit.

Lines Length

Lines of codes (LoC) should be kept as short as possible to avoid formatting issues while diff-ing, using split-views, or printing. Ideally, lines of codes should not be longer than 80 characters, nonetheless, you may sometimes see LoC of up to 100 characters in VisibleSim. It is highly discouraged to exceed this limit, since it makes code a lot harder to read. Hence, please break long conditions after && and || logical operators, and fold long function parameter lists on several lines.

Bracing Style

Use K&R bracing style: opening brace at end of first line, cuddle else on both sides.

General C++ Style Guide

Insightful guidelines for contributing to C++ source code can be found here.