mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Improve the .clang-format file a bit
* add include sorting and grouping * allow some short blocks to be on a single line
This commit is contained in:
parent
297a17593f
commit
fdea5a52c2
@ -1,4 +1,26 @@
|
|||||||
---
|
---
|
||||||
|
Language: Cpp
|
||||||
|
Standard: c++14
|
||||||
|
|
||||||
|
# Note that we cannot use IncludeIsMainRegex functionality, because it
|
||||||
|
# does not support includes in angle brackets (<>)
|
||||||
|
SortIncludes: True
|
||||||
|
IncludeBlocks: Regroup
|
||||||
|
IncludeCategories:
|
||||||
|
- Regex: '<catch2/.*\.hpp>'
|
||||||
|
Priority: 1
|
||||||
|
- Regex: '<.*/.*\.hpp>'
|
||||||
|
Priority: 2
|
||||||
|
- Regex: '<.*>'
|
||||||
|
Priority: 3
|
||||||
|
|
||||||
|
|
||||||
|
AllowShortBlocksOnASingleLine: Always
|
||||||
|
AllowShortEnumsOnASingleLine: false
|
||||||
|
AllowShortFunctionsOnASingleLine: All
|
||||||
|
AllowShortIfStatementsOnASingleLine: WithoutElse
|
||||||
|
AllowShortLambdasOnASingleLine: Inline
|
||||||
|
|
||||||
AccessModifierOffset: '-4'
|
AccessModifierOffset: '-4'
|
||||||
AlignEscapedNewlines: Left
|
AlignEscapedNewlines: Left
|
||||||
AllowAllConstructorInitializersOnNextLine: 'true'
|
AllowAllConstructorInitializersOnNextLine: 'true'
|
||||||
@ -8,17 +30,14 @@ BreakConstructorInitializers: AfterColon
|
|||||||
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
|
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
|
||||||
DerivePointerAlignment: 'false'
|
DerivePointerAlignment: 'false'
|
||||||
FixNamespaceComments: 'true'
|
FixNamespaceComments: 'true'
|
||||||
IncludeBlocks: Regroup
|
|
||||||
IndentCaseLabels: 'false'
|
IndentCaseLabels: 'false'
|
||||||
IndentPPDirectives: AfterHash
|
IndentPPDirectives: AfterHash
|
||||||
IndentWidth: '4'
|
IndentWidth: '4'
|
||||||
Language: Cpp
|
|
||||||
NamespaceIndentation: All
|
NamespaceIndentation: All
|
||||||
PointerAlignment: Left
|
PointerAlignment: Left
|
||||||
SpaceBeforeCtorInitializerColon: 'false'
|
SpaceBeforeCtorInitializerColon: 'false'
|
||||||
SpaceInEmptyParentheses: 'false'
|
SpaceInEmptyParentheses: 'false'
|
||||||
SpacesInParentheses: 'true'
|
SpacesInParentheses: 'true'
|
||||||
Standard: Cpp11
|
|
||||||
TabWidth: '4'
|
TabWidth: '4'
|
||||||
UseTab: Never
|
UseTab: Never
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user