# Manual on options are here: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# last fixed
---
Language:        Cpp
Standard: c++14
Cpp11BracedListStyle: true
ColumnLimit:     0
IndentWidth:     4
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
AccessModifierOffset: -4
TabWidth:        4
UseTab:          Always

AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Left
AlignOperands: AlignAfterOperator
AlignTrailingComments: true

AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false

AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine

ExperimentalAutoDetectBinPacking: true
BinPackArguments: false
BinPackParameters: false

BreakBeforeBraces: Custom
BraceWrapping:
  AfterCaseLabel: false
  AfterClass:      true
  AfterStruct:     true
  AfterUnion:      false
  SplitEmptyRecord: true
  AfterControlStatement: MultiLine
  AfterEnum:       false
  AfterFunction:   true
  SplitEmptyFunction: false
  AfterNamespace:  true
  SplitEmptyNamespace: true
  AfterExternBlock: true
  BeforeElse:      false
  IndentBraces:    false
  BeforeLambdaBody: false
  BeforeWhile: false

BreakBeforeBinaryOperators: NonAssignment
BreakBeforeInheritanceComma: true
BreakInheritanceList: BeforeComma
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakStringLiterals: false

EmptyLineBeforeAccessModifier: LogicalBlock
EmptyLineAfterAccessModifier: Never

CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false


DisableFormat:   false
FixNamespaceComments: true
ShortNamespaceLines: 10
ForEachMacros:
  - ARRAY_FOREACH
  - ARRAY_FOREACH_COND
  - ARRAY_CONSTFOREACH
  - ARRAY_CONSTFOREACH_COND

IncludeBlocks: Preserve
IncludeCategories:
  - Regex:           '^"(json|http)/'
    Priority:        20
  - Regex:           '^"sphinx'
    Priority:        30
  - Regex:           '^"searchd'
    Priority:        35
  - Regex:           '<[[:alnum:].]+>'
    Priority:        40
  - Regex:           '.*'
    Priority:        10
IncludeIsMainRegex: '^gtests_'
IndentCaseBlocks: true
IndentCaseLabels: false
IndentPPDirectives: None
IndentAccessModifiers: false

IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: false

MacroBlockBegin: ''
MacroBlockEnd:   ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None

PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60

DerivePointerAlignment: false
PointerAlignment: Left

ReflowComments:  true

SortIncludes: Never
SortUsingDeclarations: false

SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: false
SpaceBeforeParens: NonEmptyParentheses
SpaceBeforeSquareBrackets: false
SpacesInParentheses: true
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles:  false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInSquareBrackets: false

StatementMacros:
  - SafeDelete
  - SafeDeleteArray
  - SafeRelease
  - SafeReleaseAndZero
  - SafeAddRef
  - sphWarning
  - sphInfo
  - sphLogDebug
  - sphLogDebugv
  - sphLogDebugvv
  - sphLogDebugRpl

AttributeMacros: [ 'VARIABLE_IS_NOT_USED','NO_RETURN','FORCE_INLINE','CAPABILITY', 'SCOPED_CAPABILITY' ]
#StatementAttributeLikeMacros: [ 'VARIABLE_IS_NOT_USED','NO_RETURN','FORCE_INLINE','CAPABILITY', 'SCOPED_CAPABILITY' ]