﻿---
#####################################################################################################
#
#                    .clang-format
#
#  The clang-format style file for CM C/C++ projects. It helps to apply some style rules from
#  https://inside-docupedia.bosch.com/confluence/display/cmarchitecture/Style+Rules
#  and offers some further coding style formatting on top of that.
#
#  Created by Nils Klimanis (nils.klimanis@de.bosch.com)
#
#  Copyright Robert Bosch Car Multimedia GmbH 2020. All rights reserved.
#
#####################################################################################################

BasedOnStyle:                     Google
Language:                         Cpp     # Style will be applied to C and C++ files.
Standard:                         Auto    # The C++ standard to be used is detected automatically, based on the input.
NamespaceIndentation:             None    # No indentation after opening a namespace. (Rule S2)
AllowShortFunctionsOnASingleLine: All     # Allow functions, that fit on a single line.
ColumnLimit:                      100     # Limit the line length to be compatible with gerrit split screen view
IndentWidth:                      4       # General indentation level is 4 spaces. (Rule S2)
AccessModifierOffset:             -4      # Access modifiers like public, private and protected are on the same indentation level as the class keyword. (Rule S2)
DerivePointerAlignment:           false   # Follow the setting in PointerAlignment.
PointerAlignment:                 Left    # In declarations, pointers (*), lvalue references (&) and rvalue references (&&) are aligned to the type, not the variable. (Rule S3)
CommentPragmas:                   ^[^ ]   # To exempt lint pragmas and the like from being formatted.
IndentCaseLabels:                 false   # Do not indent labels in a switch/case statement. (Rule S2)
#InsertBraces:                     true    # Even single line statements will be surrounded by braces (requires clang-format >=15)
...
