|
1 | 1 | --- |
2 | | -# Base Style and Modern Practices |
| 2 | +# Base Style |
3 | 3 | BasedOnStyle: Google # Based on Google style guidelines |
4 | | -Standard: c++17 # Use C++17 standard |
5 | 4 | Language: Cpp # Explicitly specify C++ |
| 5 | +Standard: c++17 # Use C++17 standard |
6 | 6 |
|
7 | 7 | # Code Layout |
8 | | -ColumnLimit: 180 # Recommended max line length |
| 8 | +ColumnLimit: 180 # Recommended maximum line length |
9 | 9 | IndentWidth: 4 # 4-space indentation |
10 | | -UseTab: Never # Always use spaces instead of tabs |
11 | 10 | InsertNewlineAtEOF: true # Ensure newline at end of file |
| 11 | +UseTab: Never # Exclusively use spaces for indentation |
12 | 12 |
|
13 | 13 | # Code Structure |
14 | | -BreakBeforeBraces: Attach # Attach braces to code block |
15 | | -AllowShortFunctionsOnASingleLine: Inline # Allow short functions on single line |
16 | 14 | AllowShortIfStatementsOnASingleLine: Never # Prevent single-line if statements |
| 15 | +AllowShortFunctionsOnASingleLine: Inline # Allow short functions on single line |
17 | 16 | AllowShortLoopsOnASingleLine: false # Prevent single-line loops |
| 17 | +BreakBeforeBraces: Attach # Attach braces to code block |
18 | 18 | BreakBeforeBinaryOperators: NonAssignment # Break before non-assignment operators |
19 | 19 | BreakBeforeTernaryOperators: true # Break before ternary operators |
20 | | -BreakConstructorInitializers: BeforeColon # Break before initializer colon |
| 20 | +BreakConstructorInitializers: BeforeColon # Break constructor initializers before colon |
21 | 21 | BreakInheritanceList: BeforeColon # Break inheritance list before colon |
| 22 | +InsertBraces: true # Automatically insert braces for clarity |
22 | 23 |
|
23 | 24 | # Language Features |
24 | | -IndentCaseLabels: true # Indent switch case labels |
25 | | -NamespaceIndentation: Inner # Indent inside namespaces |
26 | 25 | AccessModifierOffset: -4 # Offset for access modifiers |
27 | 26 | CompactNamespaces: false # Keep namespaces readable |
28 | 27 | FixNamespaceComments: true # Properly format namespace comments |
| 28 | +IndentCaseLabels: true # Indent switch case labels |
| 29 | +NamespaceIndentation: All # Indent inside namespaces |
29 | 30 |
|
30 | 31 | # Pointers and References |
31 | 32 | DerivePointerAlignment: false # Manually set pointer alignment |
32 | 33 | PointerAlignment: Left # Left-align pointers and references |
33 | 34 |
|
34 | 35 | # Spacing and Alignment |
35 | | -SpaceBeforeParens: ControlStatements # Spaces before parentheses in control statements |
| 36 | +SpaceAroundPointerQualifiers: Default # Consistent space around pointer qualifiers |
| 37 | +SpaceBeforeParens: ControlStatements # Space before parentheses in control statements |
| 38 | +SpaceBeforeCtorInitializerColon: true # Space before constructor initializer colon |
| 39 | +SpaceBeforeInheritanceColon: true # Space before inheritance colon |
| 40 | +SpaceBeforeRangeBasedForLoopColon: true # Space before range-based for loop colon |
| 41 | +SpacesBeforeTrailingComments: 2 # Two spaces before trailing comments |
| 42 | +SpacesInContainerLiterals: false # No extra spaces in container literals |
36 | 43 | SpacesInParensOptions: |
37 | 44 | InEmptyParentheses: false # No spaces in empty parentheses |
38 | 45 | SpacesInSquareBrackets: false # No extra spaces in square brackets |
39 | | -SpacesBeforeTrailingComments: 2 # Two spaces before trailing comments |
40 | | -SpaceBeforeCtorInitializerColon: true # Space before constructor initializer colon |
41 | | -SpaceBeforeInheritanceColon: true # Space before inheritance colon |
42 | | -SpaceAroundPointerQualifiers: Default # Consistent space around pointer qualifiers |
43 | 46 |
|
44 | 47 | # Comments and Includes |
45 | | -SortIncludes: CaseSensitive # Sort includes in case-sensitive manner |
46 | 48 | AlignTrailingComments: |
47 | 49 | Kind: Always # Strictly align trailing comments |
48 | 50 | ReflowComments: true # Reflow comments to fit column limit |
49 | | - |
50 | | -# Initialization and Constructors |
51 | | -SpaceBeforeRangeBasedForLoopColon: true # Space before range-based for loop colon |
52 | | -SpacesInContainerLiterals: false # No extra spaces in container literals |
| 51 | +SortIncludes: CaseSensitive # Sort includes in case-sensitive manner |
0 commit comments