mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
96e5757181
To have any hope of achieving consistent formatting there needs to be a standard and a mechanism for enforcing it. This is a first step in that direction. This format specification is intended to mimic the existing style insofar as the current source has any consistent style. For example the determination as to whether ref qualifiers should bind to the type or variable name was made by trying both and seeing which produced fewer changes. One exception is the use of tabs vs. spaces, which was decided based on a comment by neilmacintosh [here][1]. To use clang-format with Visual Studio [download][2] and install the clang-format plugin. In VS ctrl-r, ctrl-f formats the current line or text selection. [1]: https://github.com/Microsoft/GSL/issues/55 [2]: http:llvm.org/builds/
22 lines
530 B
YAML
22 lines
530 B
YAML
ColumnLimit: 0
|
|
|
|
UseTab: Never
|
|
IndentWidth: 4
|
|
AccessModifierOffset: -4
|
|
NamespaceIndentation: Inner
|
|
|
|
BreakBeforeBraces: Allman
|
|
AlwaysBreakTemplateDeclarations: false
|
|
BreakConstructorInitializersBeforeComma: true
|
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
|
AllowShortBlocksOnASingleLine: true
|
|
AllowShortFunctionsOnASingleLine: All
|
|
AllowShortIfStatementsOnASingleLine: true
|
|
AllowShortLoopsOnASingleLine: true
|
|
|
|
PointerAlignment: Left
|
|
AlignConsecutiveAssignments: false
|
|
AlignTrailingComments: false
|
|
|
|
SpaceAfterCStyleCast: true
|