Skip to content

Commit e90c79d

Browse files
committed
Add SpaceBeforeParensOptions key to ClangFormat configuration
The previous ClangFormat configuration was developed for use with ClangFormat 11.0.1. The version of ClangFormat now in use by Arduino tools is 14.0.0. This configuration key was added in the interim. The key value set here was chosen in order to: - Align with behavior of the Arduino IDE 1.x "Auto Format" feature. - Comply with the established Arduino code style
1 parent 0b1f754 commit e90c79d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

other/clang-format-configuration/.clang-format

+8
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,14 @@ SpaceBeforeCpp11BracedList: false
150150
SpaceBeforeCtorInitializerColon: true
151151
SpaceBeforeInheritanceColon: true
152152
SpaceBeforeParens: ControlStatements
153+
SpaceBeforeParensOptions:
154+
AfterControlStatements: true
155+
AfterForeachMacros: true
156+
AfterFunctionDefinitionName: false
157+
AfterFunctionDeclarationName: false
158+
AfterIfMacros: true
159+
AfterOverloadedOperator: false
160+
BeforeNonEmptyParentheses: false
153161
SpaceBeforeRangeBasedForLoopColon: true
154162
SpaceBeforeSquareBrackets: false
155163
SpaceInEmptyBlock: false

0 commit comments

Comments
 (0)