Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None

# Taken from git's rules
PenaltyBreakAssignment: 10
PenaltyBreakBeforeFirstCallParameter: 30
# Adapted from git's rules
PenaltyBreakAssignment: 100
PenaltyBreakBeforeFirstCallParameter: 100
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 10
Expand All @@ -106,6 +106,14 @@ SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
# HACK: We want a space in front of the "{" in:
#
# NANOCOAP_RESOURCE(board) { .path = "/echo", .methods = COAP_GET, ... };
#
# Cpp11BracedList isn't meant for that, but there aren't any Cpp11BraceList in
# C code anyway, so it abusing this won't create any conflicts with actuall C++
# braced lists.
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatementsExceptForEachMacros
Expand Down