UltraGrid Coding Standards

Indenting and Whitespaces

Default indent is 8 spaces width and consists solely of spaces, no tabs.

Lines should be LF-terminated and there should not contain any whitespaces at the end.

Control Structures

Control structures like if, while, switch etc. should have opening block bracket at the same line as the statement itself:

if (foo) {
        do_something();
} else {
        do_something_else();
}
Functions and methods, on the other hand, should have opening curly braces at the following

Spaces

Line Length and Wrapping

Naming Conventions