]> git.mdlowis.com Git - proto/labwc.git/commitdiff
clang-format: tweak to match existing code a little better
authorJohn Lindgren <john@jlindgren.net>
Tue, 9 Sep 2025 00:34:27 +0000 (20:34 -0400)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sat, 13 Sep 2025 11:06:52 +0000 (12:06 +0100)
"clang-format -i src/view.c" before:
  1 file changed, 204 insertions(+), 169 deletions(-)

"clang-format -i src/view.c" after:
  1 file changed, 181 insertions(+), 146 deletions(-)

.clang-format

index a8e09433bcce68a92aa25d5024fd6ea00106900d..b3b6af52225ababed00c92b964a82902d9b5a10a 100644 (file)
@@ -12,14 +12,21 @@ UseTab: Always
 IndentWidth: 8
 ContinuationIndentWidth: 8
 AlignAfterOpenBracket: DontAlign
+AlignOperands: false
 AlwaysBreakAfterDefinitionReturnType: true
 BreakBeforeBinaryOperators: NonAssignment
 BreakBeforeBraces: Linux
 IndentCaseLabels: false
+PenaltyBreakOpenParenthesis: 100
+PenaltyReturnTypeOnItsOwnLine: 500
 SpaceBeforeParens: ControlStatementsExceptControlMacros
 ForEachMacros: ['for_each_view',
+                'for_each_view_reverse',
                 'wl_array_for_each',
                 'wl_list_for_each',
                 'wl_list_for_each_reverse',
                 'wl_list_for_each_reverse_safe',
                 'wl_list_for_each_safe']
+IncludeCategories:
+  - Regex: '<.*>'
+  - Regex: '.*'