[libgweather/clang-format: 1/5] Add clang-format configuration
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/clang-format: 1/5] Add clang-format configuration
- Date: Sat, 16 Oct 2021 23:03:31 +0000 (UTC)
commit 7d2f32cef873749a5dce70cbabcf2f3f50c8031f
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat Oct 16 23:11:01 2021 +0100
Add clang-format configuration
Describe the extant coding style at the best of the tool's ability, and
ignore some of the quirks of the C/GObject/GNOME style.
.clang-format | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 88 insertions(+)
---
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 00000000..82ced162
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,88 @@
+BasedOnStyle: GNU
+Language: Cpp
+
+AlignAfterOpenBracket: Align
+AlignConsecutiveAssignments: None
+AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
+AlignConsecutiveDeclarations: None
+AlignConsecutiveMacros: Consecutive
+AlignEscapedNewlines: Right
+AlignOperands: AlignAfterOperator
+AlignTrailingComments: true
+AllowAllArgumentsOnNextLine: false
+AllowAllParametersOfDeclarationOnNextLine: false
+AllowShortBlocksOnASingleLine: false
+AllowShortCaseLabelsOnASingleLine: false
+AllowShortEnumsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: None
+AllowShortIfStatementsOnASingleLine: Never
+AllowShortLoopsOnASingleLine: false
+AlwaysBreakAfterReturnType: TopLevel
+AlwaysBreakBeforeMultilineStrings: false
+BreakBeforeBinaryOperators: None
+BreakBeforeBraces: Custom
+BinPackArguments: false
+BinPackParameters: false
+BitFieldColonSpacing: Both
+BraceWrapping:
+ AfterCaseLabel: true
+ AfterEnum: true
+ AfterFunction: true
+ AfterStruct: true
+ BeforeElse: false
+ BeforeWhile: false
+BreakBeforeBinaryOperators: None
+BreakBeforeTernaryOperators: true
+BreakStringLiterals: true
+ForEachMacros: ['ITER_UP']
+IncludeBlocks: Preserve
+IndentCaseBlocks: true
+IndentCaseLabels: true
+IndentGotoLabels: false
+IndentWidth: 4
+PPIndentWidth: 1
+PointerAlignment: Right
+#clang-format 14
+#QualifierAlignment: Left
+#QualifierOrder: ['static', 'inline', 'const', 'volatile', 'type']
+ReflowComments: false
+SortIncludes: CaseInsensitive
+SpaceAfterCStyleCast: true
+SpaceAfterLogicalNot: false
+SpaceAroundPointerQualifiers: Both
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeCaseColon: false
+SpaceBeforeParens: Always
+SpaceBeforeSquareBrackets: false
+SpaceInEmptyBlock: true
+SpaceInEmptyParentheses: false
+SpacesInCStyleCastParentheses: false
+SpacesInConditionalStatement: false
+SpacesInContainerLiterals: false
+SpacesInParentheses: false
+SpacesInSquareBrackets: false
+StatementMacros: [
+ 'G_DEFINE_ABSTRACT_TYPE',
+ 'G_DEFINE_BOXED_TYPE',
+ 'G_DEFINE_FINAL_TYPE',
+ 'G_DEFINE_FINAL_TYPE_WITH_CODE',
+ 'G_DEFINE_FINAL_TYPE_WITH_PRIVATE',
+ 'G_DEFINE_INTERFACE',
+ 'G_DEFINE_TYPE',
+ 'G_DEFINE_TYPE_WITH_PRIVATE',
+ 'G_DEFINE_TYPE_WITH_CODE',
+]
+TabWidth: 8
+TypenameMacros: [
+ 'g_autoptr',
+ 'g_auto',
+ 'g_autofree',
+]
+UseTab: Never
+#WhitespaceSensitiveMacros: ['C_', 'NC_', 'N_', '_',]
+
+# Our column limit is actually 80, but setting that results in clang-format
+# making a lot of dubious hanging-indent choices; disable it and assume the
+# developer will line wrap appropriately. clang-format will still check
+# existing hanging indents.
+ColumnLimit: 0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]