iproute2/.clang-format
<<
>>
Prefs
   1# SPDX-License-Identifier: GPL-2.0
   2#
   3# clang-format configuration file. Intended for clang-format >= 4.
   4#
   5# For more information, see:
   6#
   7#   Documentation/process/clang-format.rst
   8#   https://clang.llvm.org/docs/ClangFormat.html
   9#   https://clang.llvm.org/docs/ClangFormatStyleOptions.html
  10#
  11---
  12AccessModifierOffset: -4
  13AlignAfterOpenBracket: Align
  14AlignConsecutiveAssignments: false
  15AlignConsecutiveDeclarations: false
  16#AlignEscapedNewlines: Left # Unknown to clang-format-4.0
  17AlignOperands: true
  18AlignTrailingComments: false
  19AllowAllParametersOfDeclarationOnNextLine: false
  20AllowShortBlocksOnASingleLine: false
  21AllowShortCaseLabelsOnASingleLine: false
  22AllowShortFunctionsOnASingleLine: None
  23AllowShortIfStatementsOnASingleLine: false
  24AllowShortLoopsOnASingleLine: false
  25AlwaysBreakAfterDefinitionReturnType: None
  26AlwaysBreakAfterReturnType: None
  27AlwaysBreakBeforeMultilineStrings: false
  28AlwaysBreakTemplateDeclarations: false
  29BinPackArguments: true
  30BinPackParameters: true
  31BraceWrapping:
  32  AfterClass: false
  33  AfterControlStatement: false
  34  AfterEnum: false
  35  AfterFunction: true
  36  AfterNamespace: true
  37  AfterObjCDeclaration: false
  38  AfterStruct: false
  39  AfterUnion: false
  40  #AfterExternBlock: false # Unknown to clang-format-5.0
  41  BeforeCatch: false
  42  BeforeElse: false
  43  IndentBraces: false
  44  #SplitEmptyFunction: true # Unknown to clang-format-4.0
  45  #SplitEmptyRecord: true # Unknown to clang-format-4.0
  46  #SplitEmptyNamespace: true # Unknown to clang-format-4.0
  47BreakBeforeBinaryOperators: None
  48BreakBeforeBraces: Custom
  49#BreakBeforeInheritanceComma: false # Unknown to clang-format-4.0
  50BreakBeforeTernaryOperators: false
  51BreakConstructorInitializersBeforeComma: false
  52#BreakConstructorInitializers: BeforeComma # Unknown to clang-format-4.0
  53BreakAfterJavaFieldAnnotations: false
  54BreakStringLiterals: false
  55ColumnLimit: 80
  56CommentPragmas: '^ IWYU pragma:'
  57#CompactNamespaces: false # Unknown to clang-format-4.0
  58ConstructorInitializerAllOnOneLineOrOnePerLine: false
  59ConstructorInitializerIndentWidth: 8
  60ContinuationIndentWidth: 8
  61Cpp11BracedListStyle: false
  62DerivePointerAlignment: false
  63DisableFormat: false
  64ExperimentalAutoDetectBinPacking: false
  65#FixNamespaceComments: false # Unknown to clang-format-4.0
  66
  67# Taken from:
  68#   git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' include/ \
  69#   | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$,  - '\1'," \
  70#   | sort | uniq
  71ForEachMacros:
  72  - 'list_for_each_entry'
  73  - 'list_for_each_entry_safe'
  74  - 'mnl_attr_for_each_nested'
  75  - 'hlist_for_each'
  76  - 'hlist_for_each_safe'
  77  - 'hlist_for_each_entry'
  78
  79#IncludeBlocks: Preserve # Unknown to clang-format-5.0
  80IncludeCategories:
  81  - Regex: '.*'
  82    Priority: 1
  83IncludeIsMainRegex: '(Test)?$'
  84IndentCaseLabels: false
  85#IndentPPDirectives: None # Unknown to clang-format-5.0
  86IndentWidth: 8
  87IndentWrappedFunctionNames: false
  88JavaScriptQuotes: Leave
  89JavaScriptWrapImports: true
  90KeepEmptyLinesAtTheStartOfBlocks: false
  91MacroBlockBegin: ''
  92MacroBlockEnd: ''
  93MaxEmptyLinesToKeep: 1
  94NamespaceIndentation: Inner
  95#ObjCBinPackProtocolList: Auto # Unknown to clang-format-5.0
  96ObjCBlockIndentWidth: 8
  97ObjCSpaceAfterProperty: true
  98ObjCSpaceBeforeProtocolList: true
  99
 100# Taken from git's rules
 101#PenaltyBreakAssignment: 10 # Unknown to clang-format-4.0
 102PenaltyBreakBeforeFirstCallParameter: 30
 103PenaltyBreakComment: 10
 104PenaltyBreakFirstLessLess: 0
 105PenaltyBreakString: 10
 106PenaltyExcessCharacter: 100
 107PenaltyReturnTypeOnItsOwnLine: 60
 108
 109PointerAlignment: Right
 110ReflowComments: false
 111SortIncludes: false
 112#SortUsingDeclarations: false # Unknown to clang-format-4.0
 113SpaceAfterCStyleCast: false
 114SpaceAfterTemplateKeyword: true
 115SpaceBeforeAssignmentOperators: true
 116#SpaceBeforeCtorInitializerColon: true # Unknown to clang-format-5.0
 117#SpaceBeforeInheritanceColon: true # Unknown to clang-format-5.0
 118SpaceBeforeParens: ControlStatements
 119#SpaceBeforeRangeBasedForLoopColon: true # Unknown to clang-format-5.0
 120SpaceInEmptyParentheses: false
 121SpacesBeforeTrailingComments: 1
 122SpacesInAngles: false
 123SpacesInContainerLiterals: false
 124SpacesInCStyleCastParentheses: false
 125SpacesInParentheses: false
 126SpacesInSquareBrackets: false
 127Standard: Cpp03
 128TabWidth: 8
 129UseTab: Always
 130...
 131