Files
gh-jamie-bitflight-claude-s…/skills/clang-format/assets/configs/google-cpp-modified.clang-format
2025-11-29 18:49:58 +08:00

52 lines
983 B
Plaintext

---
Language: Cpp
BasedOnStyle: Google
IndentWidth: 4
ColumnLimit: 120
# Pointer and reference alignment
PointerAlignment: Left
ReferenceAlignment: Left
DerivePointerAlignment: false
# Line breaking
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLoopsOnASingleLine: false
AllowShortBlocksOnASingleLine: Empty
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
# Includes
SortIncludes: CaseSensitive
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^".*\.h"'
Priority: 1
- Regex: '^".*'
Priority: 2
- Regex: '^<.*\.h>'
Priority: 3
- Regex: '^<.*'
Priority: 4
# Braces
BreakBeforeBraces: Attach
# Indentation
IndentCaseLabels: true
IndentPPDirectives: AfterHash
# Spacing
SpaceBeforeParens: ControlStatements
SpacesBeforeTrailingComments: 2
# Comments
ReflowComments: true
FixNamespaceComments: true
# Empty lines
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: false
...