cesium-native/.clang-format

55 lines
1.9 KiB
Plaintext
Raw Permalink Normal View History

2021-04-29 23:06:34 +08:00
2021-04-30 20:56:47 +08:00
# Based on the LLVM coding style https://llvm.org/docs/CodingStandards.html
BasedOnStyle: LLVM
2021-04-29 23:06:34 +08:00
# Always add a line break after an opening bracket if the parameters
2021-04-29 23:06:34 +08:00
# do not fit on a single line
AlignAfterOpenBracket: AlwaysBreak
2021-04-29 23:06:34 +08:00
# If arguments don't all fit on a single line, place each one in
# a new line
BinPackArguments: false
2021-04-29 23:06:34 +08:00
# If a function call or braced initializer list does not fit on a
2021-04-29 23:06:34 +08:00
# line, allow putting all arguments onto the next line
# (even if BinPackArguments is false).
AllowAllArgumentsOnNextLine: false
# If parameters don't all fit on a single line, place each one in
# a new line
BinPackParameters: false
2021-04-29 23:06:34 +08:00
# If the function declaration does not fit on a line, allow putting
2021-04-29 23:06:34 +08:00
# all parameters of a function declaration onto the next line
# (even when BinPackParameters is false).
AllowAllParametersOfDeclarationOnNextLine: false
# Use 'int* a;' (instead of 'int *a;')
PointerAlignment: Left
2021-04-29 23:06:34 +08:00
# If the constructor initializers doe not fit on a line, put each
2021-04-29 23:06:34 +08:00
# initializer on its own line.
ConstructorInitializerAllOnOneLineOrOnePerLine: true
2021-04-29 23:06:34 +08:00
# Do not break comment lines that contain the given regex. This
# is here to avoid breaking lines within "{@link SomeClass}"
# which would cause doxygen to fail.
CommentPragmas: '{.*}'
# Disregard any exising include order, and re-order the headers
# to use the following order based on the include path regexes:
IncludeBlocks: Regroup
IncludeCategories:
# Local includes, enclosed in quotation marks, ending in `.h`
- Regex: '"[A-Za-z0-9.+_\/\-]+\.h"'
Priority: 1
# Cesium project includes, starting with `<Cesium`, and ending with `.h>`
2021-10-12 05:28:44 +08:00
- Regex: '<Cesium[A-Za-z0-9+_\/\-]+\.h>'
Priority: 2
# Third party includes, of the form `<something/something>` or `<something.h>`
- Regex: '(<[A-Za-z0-9_\/\-]+\/[A-Za-z0-9_\/\-\.]+>)|(<[A-Za-z0-9+_\/\-]+\.h>)'
Priority: 3
# Standard library includes, of the form `<something>
- Regex: '<[A-Za-z0-9_]+>'
Priority: 4