diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-04-02 23:13:36 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-04-04 14:10:40 +0200 |
commit | f20fa61eb4c323eb1642c69c236b3d9a1f8b2cdb (patch) | |
tree | b9245b78632c60a9922347a53a8e9937bb5f52c5 /.clang-format | |
parent | 97fc98901cc2dcfa3e1903374cb9040e93fd142f (diff) | |
download | qpdf-f20fa61eb4c323eb1642c69c236b3d9a1f8b2cdb.tar.zst |
Add .clang-format and .dir-locals.el files to set coding style
Configure emacs and clang-format 15 to the coding style I am choosing
for qpdf.
Diffstat (limited to '.clang-format')
-rw-r--r-- | .clang-format | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..e9ffa627 --- /dev/null +++ b/.clang-format @@ -0,0 +1,50 @@ +# -*- yaml -*- +# This configuration works with clang-format-15. +# See https://clang.llvm.org/docs/ClangFormatStyleOptions.html +--- +Language: Cpp +BasedOnStyle: LLVM +AlignAfterOpenBracket: AlwaysBreak +AlignEscapedNewlines: DontAlign +AlignOperands: DontAlign +AllowShortFunctionsOnASingleLine: None +AlwaysBreakAfterReturnType: AllDefinitions +AlwaysBreakTemplateDeclarations: Yes +AttributeMacros: + - QPDF_DLL + - QPDF_DLL_CLASS +BinPackArguments: false +BinPackParameters: false +BraceWrapping: + AfterClass: true + AfterFunction: true + AfterNamespace: true + AfterStruct: true + AfterUnion: true +BreakBeforeBraces: Custom +BreakConstructorInitializers: AfterColon +DeriveLineEnding: false +PackConstructorInitializers: Never +IncludeCategories: + - Regex: '^["<](qpdf)/' + Priority: 1 + SortPriority: 0 + CaseSensitive: false + - Regex: '.*' + Priority: 2 + SortPriority: 0 + CaseSensitive: false + - Regex: '.*' + Priority: 1 + SortPriority: 0 + CaseSensitive: false +IndentCaseBlocks: true +IndentExternBlock: Indent +IndentPPDirectives: AfterHash +IndentWidth: 4 +InsertTrailingCommas: Wrapped +KeepEmptyLinesAtTheStartOfBlocks: false +NamespaceIndentation: All +PointerAlignment: Left +PPIndentWidth: 1 +SpaceBeforeInheritanceColon: false |