clang-format: Minor tweaks
Invert KeepEmptyLinesAtTheStartOfBlocks. We used to require an empty line at the beginning of functions with no local variables, which I believe is the reason for this setting. Now it is discouraged in new code. Tell clang-format to align consecutive macros, since we tend to do that. clang-format's output isn't quite what we want here. Typically we have a tab after a #define for some reason, and clang-format doesn't appear to have an option for that. clang-format will also use a mix of tabs and spaces to minimize indentation, which is also against our convention. However, the result looks better with this setting than without. Reviewed by: emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D29870
This commit is contained in:
+3
-1
@@ -2,6 +2,7 @@
|
|||||||
---
|
---
|
||||||
BasedOnStyle: WebKit
|
BasedOnStyle: WebKit
|
||||||
AlignAfterOpenBracket: DontAlign
|
AlignAfterOpenBracket: DontAlign
|
||||||
|
AlignConsecutiveMacros: AcrossEmptyLines
|
||||||
AlignConsecutiveAssignments: false
|
AlignConsecutiveAssignments: false
|
||||||
AlignConsecutiveDeclarations: false
|
AlignConsecutiveDeclarations: false
|
||||||
AlignEscapedNewlines: Left
|
AlignEscapedNewlines: Left
|
||||||
@@ -94,6 +95,7 @@ ForEachMacros:
|
|||||||
- TAILQ_FOREACH_SAFE
|
- TAILQ_FOREACH_SAFE
|
||||||
- VM_MAP_ENTRY_FOREACH
|
- VM_MAP_ENTRY_FOREACH
|
||||||
- VM_PAGE_DUMP_FOREACH
|
- VM_PAGE_DUMP_FOREACH
|
||||||
|
SpaceBeforeParens: ControlStatementsExceptForEachMacros
|
||||||
IndentCaseLabels: false
|
IndentCaseLabels: false
|
||||||
IndentPPDirectives: None
|
IndentPPDirectives: None
|
||||||
Language: Cpp
|
Language: Cpp
|
||||||
@@ -162,7 +164,7 @@ IncludeCategories:
|
|||||||
# http://llvm.org/docs/CodingStandards.html#include-style
|
# http://llvm.org/docs/CodingStandards.html#include-style
|
||||||
IncludeIsMainRegex: 'BLAH_DONT_MATCH_ANYTHING'
|
IncludeIsMainRegex: 'BLAH_DONT_MATCH_ANYTHING'
|
||||||
SortIncludes: true
|
SortIncludes: true
|
||||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||||
TypenameMacros:
|
TypenameMacros:
|
||||||
- ARB_ELMTYPE
|
- ARB_ELMTYPE
|
||||||
- ARB_HEAD
|
- ARB_HEAD
|
||||||
|
|||||||
Reference in New Issue
Block a user