Skip to content

Latest commit

 

History

History
66 lines (44 loc) · 1.83 KB

STYLE_GUIDE.md

File metadata and controls

66 lines (44 loc) · 1.83 KB

Robocomp Style Guide

Table of Contents

Robocomp Python Style Guide

For Python it is very simple. We try to follow the style code defined in PEP 8 -- Style Guide for Python Code.

If you find python code in Robocomp that does not comply with PEP8 we would appreciate a Pull Request to fix it. Thank you.

Robocomp C++ Style Guide

For C++ it is not so simple. There is no standard style defined. Several projects have established their own style codes. In Robocomp we are trying to agree and define a style code and for now what we have are a series of recommendations:

Layout

Indentation

4 spaces. No tabs.

Added spaces

Space before each new parameter in function calls and function declarations

The #define Guard

https://google.github.io/styleguide/cppguide.html#The__define_Guard

Naming Conventions

Variables

Use snake_case

Functions

Use snake_case

Classes

Use CamelCase

Methods

Use snake_case

Curly Braces

New line before open brace

Always use namespaces

Don’t use the using clause for namespaces in .h files https://lefticus.gitbooks.io/cpp-best-practices/content/03-Style.html#always-use-namespaces