|
| 1 | +# OSARA: Open Source Accessibility for the REAPER Application |
| 2 | +# .clang-format |
| 3 | +# Author: James Teh <[email protected]> |
| 4 | +# Copyright 2023 Leonard de Ruijter |
| 5 | +# License: GNU General Public License version 2.0 |
| 6 | + |
| 7 | +# Style based on Google's C++ style guide. |
| 8 | +BasedOnStyle: Google |
| 9 | +# Offset for access modifiers (public, protected, private). |
| 10 | +AccessModifierOffset: 0 |
| 11 | +# Align code after an open bracket with block indentation. |
| 12 | +AlignAfterOpenBracket: BlockIndent |
| 13 | +# Do not align consecutive assignments. |
| 14 | +AlignConsecutiveAssignments: None |
| 15 | +# Do not align consecutive bit fields. |
| 16 | +AlignConsecutiveBitFields: None |
| 17 | +# Do not align consecutive declarations. |
| 18 | +AlignConsecutiveDeclarations: None |
| 19 | +# Do not align consecutive macros. |
| 20 | +AlignConsecutiveMacros: None |
| 21 | +# Do not align escaped newlines. |
| 22 | +AlignEscapedNewlines: DontAlign |
| 23 | +# Do not align operands in expressions. |
| 24 | +AlignOperands: DontAlign |
| 25 | +# Do not align trailing comments. |
| 26 | +AlignTrailingComments: Never |
| 27 | +# Do not allow short blocks (e.g., if statements without braces) on a single line. |
| 28 | +AllowShortBlocksOnASingleLine: Never |
| 29 | +# Do not allow short case labels in switch statements on a single line. |
| 30 | +AllowShortCaseLabelsOnASingleLine: false |
| 31 | +# Do not allow short enums on a single line. |
| 32 | +AllowShortEnumsOnASingleLine: false |
| 33 | +# Only allow empty functions on a single line. |
| 34 | +AllowShortFunctionsOnASingleLine: Empty |
| 35 | +# Do not allow short if statements on a single line. |
| 36 | +AllowShortIfStatementsOnASingleLine: Never |
| 37 | +# Do not allow short loops on a single line. |
| 38 | +AllowShortLoopsOnASingleLine: false |
| 39 | +# Add a space after the colon in bit fields. |
| 40 | +BitFieldColonSpacing: After |
| 41 | +# Break before binary operators that are not assignments. |
| 42 | +# E.g. break before "+", but not before "+=". |
| 43 | +BreakBeforeBinaryOperators: NonAssignment |
| 44 | +# Attach opening braces to the same line as the statement or declaration it belongs to. |
| 45 | +BreakBeforeBraces: Attach |
| 46 | +# Ternary operators will be placed after line breaks. |
| 47 | +BreakBeforeTernaryOperators: true |
| 48 | +# Break string literals if they are too long. |
| 49 | +BreakStringLiterals: true |
| 50 | +# Indentation width for constructor initializers. |
| 51 | +ConstructorInitializerIndentWidth: 2 |
| 52 | +# Indentation width for continuation lines. |
| 53 | +ContinuationIndentWidth: 2 |
| 54 | +# Format braced lists as best suited for C++11 braced lists. |
| 55 | +Cpp11BracedListStyle: true |
| 56 | +# Use a fixed alignment for all pointers. |
| 57 | +DerivePointerAlignment: false |
| 58 | +# Do not indent case blocks in switch statements. |
| 59 | +IndentCaseBlocks: false |
| 60 | +# Indent case labels in switch statements. |
| 61 | +IndentCaseLabels: true |
| 62 | +# Standard indentation width. |
| 63 | +IndentWidth: 2 |
| 64 | +# Do not indent if a function definition or declaration is wrapped after the type. |
| 65 | +IndentWrappedFunctionNames: false |
| 66 | +# Insert a newline at end of file if missing. |
| 67 | +InsertNewlineAtEOF: true |
| 68 | +# Maximum number of consecutive empty lines to keep. |
| 69 | +MaxEmptyLinesToKeep: 2 |
| 70 | +# Do not indent namespaces. |
| 71 | +NamespaceIndentation: None |
| 72 | +# Penalty for indentation using spaces rather than tabs. |
| 73 | +PenaltyIndentedWhitespace: 0 |
| 74 | +# Pointer alignment (Left or Right). |
| 75 | +PointerAlignment: Left |
| 76 | +# Separate definition blocks (Always, Never, or Leave). |
| 77 | +SeparateDefinitionBlocks: Always |
| 78 | +# Number of spaces before trailing comments. |
| 79 | +SpacesBeforeTrailingComments: 1 |
| 80 | +# Do not add a space after a C-style cast. |
| 81 | +SpaceAfterCStyleCast: false |
| 82 | +# Do not add a space after the template keyword. |
| 83 | +SpaceAfterTemplateKeyword: false |
| 84 | +# Sort includes (CaseSensitive, CaseInsensitive, or None). |
| 85 | +SortIncludes: CaseInsensitive |
| 86 | +# C++ standard to be followed (e.g., c++98, c++11, c++14, c++17, c++20). |
| 87 | +Standard: c++20 |
| 88 | +# Add a space before opening parentheses in control statements. |
| 89 | +SpaceBeforeParens: ControlStatements |
| 90 | +# Do not add a space before square brackets. |
| 91 | +SpaceBeforeSquareBrackets: false |
| 92 | +# Width of a tab character. |
| 93 | +TabWidth: 2 |
| 94 | +# Always use tabs for indentation. |
| 95 | +UseTab: Always |
0 commit comments