summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-format54
-rw-r--r--src/server/picohttpparser/.clang-format12
2 files changed, 43 insertions, 23 deletions
diff --git a/.clang-format b/.clang-format
index 2abc64d..6adc436 100644
--- a/.clang-format
+++ b/.clang-format
@@ -9,16 +9,17 @@
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
---
-AccessModifierOffset: -4
-AlignAfterOpenBracket: Align
+AccessModifierOffset: -3
+AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
-#AlignEscapedNewlines: Left # Unknown to clang-format-4.0
-AlignOperands: true
-AlignTrailingComments: false
-AllowAllParametersOfDeclarationOnNextLine: false
-AllowShortBlocksOnASingleLine: false
-AllowShortCaseLabelsOnASingleLine: false
+AlignEscapedNewlines: Left
+AlignOperands: false
+AlignTrailingComments: true
+AllowAllArgumentsOnNextLine: true
+AllowAllParametersOfDeclarationOnNextLine: true
+AllowShortBlocksOnASingleLine: Empty
+AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
@@ -29,14 +30,14 @@ AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
- AfterClass: false
+ AfterClass: true
AfterControlStatement: false
- AfterEnum: false
+ AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
- AfterStruct: false
- AfterUnion: false
+ AfterStruct: true
+ AfterUnion: true
#AfterExternBlock: false # Unknown to clang-format-5.0
BeforeCatch: false
BeforeElse: false
@@ -44,10 +45,10 @@ BraceWrapping:
#SplitEmptyFunction: true # Unknown to clang-format-4.0
#SplitEmptyRecord: true # Unknown to clang-format-4.0
#SplitEmptyNamespace: true # Unknown to clang-format-4.0
-BreakBeforeBinaryOperators: None
+BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
#BreakBeforeInheritanceComma: false # Unknown to clang-format-4.0
-BreakBeforeTernaryOperators: false
+BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
#BreakConstructorInitializers: BeforeComma # Unknown to clang-format-4.0
BreakAfterJavaFieldAnnotations: false
@@ -56,11 +57,11 @@ ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
#CompactNamespaces: false # Unknown to clang-format-4.0
ConstructorInitializerAllOnOneLineOrOnePerLine: false
-ConstructorInitializerIndentWidth: 8
-ContinuationIndentWidth: 8
+ConstructorInitializerIndentWidth: 6
+ContinuationIndentWidth: 6
Cpp11BracedListStyle: false
DerivePointerAlignment: false
-DisableFormat: false
+DisableFormat: true
ExperimentalAutoDetectBinPacking: false
#FixNamespaceComments: false # Unknown to clang-format-4.0
@@ -69,16 +70,19 @@ IncludeCategories:
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
+#IndentCaseBlocks: false
IndentCaseLabels: false
+IndentGotoLabels: false
#IndentPPDirectives: None # Unknown to clang-format-5.0
-IndentWidth: 8
+IndentWidth: 3
IndentWrappedFunctionNames: false
+#InsertTrailingCommas: Wrapped
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
-MaxEmptyLinesToKeep: 1
+MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
#ObjCBinPackProtocolList: Auto # Unknown to clang-format-5.0
ObjCBlockIndentWidth: 8
@@ -87,11 +91,12 @@ ObjCSpaceBeforeProtocolList: true
# Taken from git's rules
#PenaltyBreakAssignment: 10 # Unknown to clang-format-4.0
-PenaltyBreakBeforeFirstCallParameter: 30
+PenaltyBreakBeforeFirstCallParameter: 60
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 10
PenaltyExcessCharacter: 100
+#PenaltyIndentedWhitespace: 20
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
@@ -100,6 +105,7 @@ SortIncludes: false
#SortUsingDeclarations: false # Unknown to clang-format-4.0
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
+#SpaceAroundPointerQualifiers: Both
SpaceBeforeAssignmentOperators: true
#SpaceBeforeCtorInitializerColon: true # Unknown to clang-format-5.0
#SpaceBeforeInheritanceColon: true # Unknown to clang-format-5.0
@@ -110,9 +116,11 @@ SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
-SpacesInParentheses: false
+SpacesInConditionalStatement: true
+SpacesInParentheses: true
SpacesInSquareBrackets: false
Standard: Cpp03
-TabWidth: 8
-UseTab: Always
+TabWidth: 3
+#UseTab: AlignWithSpaces
+UseTab: ForContinuationAndIndentation
...
diff --git a/src/server/picohttpparser/.clang-format b/src/server/picohttpparser/.clang-format
new file mode 100644
index 0000000..8738fdd
--- /dev/null
+++ b/src/server/picohttpparser/.clang-format
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# clang-format configuration file. Intended for clang-format >= 4.
+#
+# For more information, see:
+#
+# Documentation/process/clang-format.rst
+# https://clang.llvm.org/docs/ClangFormat.html
+# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
+#
+---
+DisableFormat: true