# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-FileCopyrightText: 2025 ai-ad4 and the FreePDFEditor contributors # clang-format configuration for FreePDFEditor. Enforced in CI (ยง13.2 rule 7) # and via a pre-commit hook. Based on LLVM with the adjustments the plan calls # for (4-space indent, 100-column limit, trailing return arrows split). BasedOnStyle: LLVM Language: Cpp Standard: c++20 IndentWidth: 4 TabWidth: 4 UseTab: Never ColumnLimit: 100 AccessModifierOffset: -4 AlignAfterOpenBracket: Align AlignConsecutiveAssignments: Consecutive AlignConsecutiveDeclarations: Consecutive AlignEscapedNewlines: Left AlignOperands: Align AlignTrailingComments: true AllowAllArgumentsOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: Empty AllowShortFunctionsOnASingleLine: Inline AllowShortIfStatementsOnASingleLine: Never AllowShortLoopsOnASingleLine: false AlwaysBreakBeforeMultilineStrings: true AlwaysBreakTemplateDeclarations: Yes BinPackArguments: false BinPackParameters: false BreakBeforeBinaryOperators: NonAssignment BreakBeforeBraces: Attach BreakBeforeTernaryOperators: true BreakConstructorInitializers: BeforeColon BreakInheritanceList: BeforeColon BreakStringLiterals: true ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 Cpp11BracedListStyle: true DerivePointerAlignment: false FixNamespaceComments: true IncludeBlocks: Regroup IncludeSortBasedOnDependency: true IndentCaseLabels: true IndentPPDirectives: BeforeHash KeepEmptyLinesAtTheStartOfBlocks: false NamespaceIndentation: None PointerAlignment: Left ReflowComments: true SortIncludes: CaseSensitive SpaceAfterCStyleCast: false SpaceAfterLogicalNot: false SpaceAfterTemplateKeyword: true SpaceBeforeAssignmentOperators: true SpaceBeforeCpp11BracedList: false SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements SpaceBeforeRangeBasedForLoopColon: true SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 SpacesInAngles: Never SpacesInContainerLiterals: false SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false Standard: c++20 UseCRLF: false