diff --git a/.clang-format b/.clang-format index 41969eca4b74597f08863cc44b8311593d42c3bf..b48e7813e4fb1cb727bd40200dc0f71d48bf990c 100644 --- a/.clang-format +++ b/.clang-format @@ -32,6 +32,9 @@ AlignConsecutiveAssignments: false # double b = 3.14; AlignConsecutiveDeclarations: false +# Align consecutive macro definitions. +AlignConsecutiveMacros: true + # Align escaped newlines as far left as possible # #define A \ # int aaaa; \ @@ -39,10 +42,9 @@ AlignConsecutiveDeclarations: false # int cccccccc; AlignEscapedNewlines: Left -# Align operands of binary and ternary expressions -# int aaa = bbbbbbbbbbb + -# cccccc; -AlignOperands: true +# Don't enforce alignment after linebreaks and instead +# rely on the ContinuationIndentWidth value. +AlignOperands: false # Don't align trailing comments # int a; // Comment a @@ -209,13 +211,14 @@ KeepEmptyLinesAtTheStartOfBlocks: false # Penalties # This decides what order things should be done if a line is too long -PenaltyBreakAssignment: 10 -PenaltyBreakBeforeFirstCallParameter: 30 -PenaltyBreakComment: 10 +PenaltyBreakAssignment: 5 +PenaltyBreakBeforeFirstCallParameter: 5 +PenaltyBreakComment: 5 PenaltyBreakFirstLessLess: 0 -PenaltyBreakString: 10 -PenaltyExcessCharacter: 100 -PenaltyReturnTypeOnItsOwnLine: 60 +PenaltyBreakOpenParenthesis: 300 +PenaltyBreakString: 5 +PenaltyExcessCharacter: 10 +PenaltyReturnTypeOnItsOwnLine: 300 # Don't sort #include's SortIncludes: false diff --git a/path.h b/path.h index e91d19fff60f457e57ac94df3e63d7db7ab2f58d..d06c4d93859c5107b948418d0efcc1854d3e224b 100644 --- a/path.h +++ b/path.h @@ -6,6 +6,9 @@ struct strbuf; struct string_list; struct worktree; +static const struct strbuf *a_really_really_large_function_name(struct +strbuf resolved, const char *path, int flags); + /* * The result to all functions which return statically allocated memory may be * overwritten by another call to _any_ one of these functions. Consider using