editorconfig: Add C++ indentation style

This commit adds the indentation style for the C++ source and header
files.

Note that the C++ indentation style has been configured to match that
of the C files because the C++ source files we currently have in the
Zephyr repository follow the style we enforce for the C files.

In the future, it may be preferable to follow the indentation style
recommended by one of the common C++ style guides, such as the Google
C++ Style Guide which recommends 2 spaces for indentation.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
Stephanos Ioannidis 2022-04-28 16:51:49 +09:00 committed by Anas Nashif
parent ef9c4f76cc
commit 3a7cf87821

View file

@ -21,6 +21,11 @@ indent_size = 8
indent_style = tab indent_style = tab
indent_size = 8 indent_size = 8
# C++
[*.{cpp,hpp}]
indent_style = tab
indent_size = 8
# Linker Script # Linker Script
[*.ld] [*.ld]
indent_style = tab indent_style = tab