чување 1664f81d3b8b68daa762fa86711ac6b1c5267169 родитељ c50e8b615937c9a36fec499a87daef6f11958e7e Аутор: Страхиња Радић <contact@strahinja.org> Датум: Tue, 15 Mar 2022 06:42:35 +0100 .clang-format: New file; HACKING: Change the description of how to format code Diffstat:
| A | .clang-format | | | 90 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| M | HACKING | | | 6 | +++--- |
измењених датотека: 2, додавања: 93(+), брисања: 3(-)
diff --git a/.clang-format b/.clang-format @@ -0,0 +1,90 @@ +--- +AlignAfterOpenBracket: DontAlign +AlignConsecutiveMacros: 'true' +AlignConsecutiveAssignments: 'true' +AlignConsecutiveDeclarations: 'false' +AlignEscapedNewlines: Left +AlignOperands: 'false' +AlignTrailingComments: 'true' +AllowAllArgumentsOnNextLine: 'false' +AllowAllParametersOfDeclarationOnNextLine: 'true' +AllowShortBlocksOnASingleLine: 'false' +AllowShortCaseLabelsOnASingleLine: 'false' +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: 'false' +AlwaysBreakAfterReturnType: AllDefinitions +AlwaysBreakBeforeMultilineStrings: 'false' +AlwaysBreakTemplateDeclarations: 'Yes' +BinPackArguments: 'true' +BinPackParameters: 'true' +BraceWrapping: + AfterCaseLabel: 'true' + AfterClass: 'true' + AfterControlStatement: 'true' + AfterEnum: 'false' + AfterFunction: 'true' + AfterNamespace: 'true' + AfterObjCDeclaration: 'true' + AfterStruct: 'false' + AfterUnion: 'false' + AfterExternBlock: 'false' + BeforeCatch: 'true' + BeforeElse: 'true' + IndentBraces: 'false' + SplitEmptyFunction: 'true' + SplitEmptyRecord: 'true' + SplitEmptyNamespace: 'true' +BreakAfterJavaFieldAnnotations: 'false' +BreakBeforeBinaryOperators: All +BreakBeforeBraces: Custom +BreakBeforeTernaryOperators: 'true' +BreakConstructorInitializers: AfterColon +BreakInheritanceList: AfterColon +BreakStringLiterals: 'true' +ColumnLimit: '80' +CompactNamespaces: 'false' +ConstructorInitializerAllOnOneLineOrOnePerLine: 'true' +ConstructorInitializerIndentWidth: '8' +ContinuationIndentWidth: '8' +Cpp11BracedListStyle: 'true' +FixNamespaceComments: 'true' +IncludeBlocks: Preserve +IndentCaseLabels: 'false' +IndentPPDirectives: None +IndentWidth: '8' +KeepEmptyLinesAtTheStartOfBlocks: 'false' +Language: Cpp +MaxEmptyLinesToKeep: '1' +NamespaceIndentation: Inner +ObjCBinPackProtocolList: Auto +ObjCBlockIndentWidth: '8' +ObjCSpaceAfterProperty: 'false' +ObjCSpaceBeforeProtocolList: 'false' +PenaltyBreakBeforeFirstCallParameter: '500' +PenaltyExcessCharacter: '50' +PointerAlignment: Left +ReflowComments: 'true' +SortIncludes: 'false' +SortUsingDeclarations: 'true' +SpaceAfterCStyleCast: 'false' +SpaceAfterLogicalNot: 'false' +SpaceAfterTemplateKeyword: 'false' +SpaceBeforeAssignmentOperators: 'true' +SpaceBeforeCpp11BracedList: 'false' +SpaceBeforeCtorInitializerColon: 'true' +SpaceBeforeInheritanceColon: 'true' +SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: 'false' +SpaceInEmptyParentheses: 'false' +SpacesBeforeTrailingComments: '8' +SpacesInAngles: 'false' +SpacesInCStyleCastParentheses: 'false' +SpacesInContainerLiterals: 'false' +SpacesInParentheses: 'false' +SpacesInSquareBrackets: 'false' +Standard: Auto +TabWidth: '8' +UseTab: Always + +... diff --git a/HACKING b/HACKING @@ -13,12 +13,12 @@ clang-format with the configuration file located at: https://git.sr.ht/~strahinja/dotfiles/tree/master/item/.clang-format -You can format the files before creating patches to send to me by using the -command +This repository should also contain a copy of that file. You can format the +files before creating patches to send to me by using the command $ clang-format -i filename.c # also applies to *.h -with the above .clang-format located in your $HOME directory. +issued from the main directory of the repository. Creating customizations