Files
playbook/templates/cpp/.clang-format
T
csh 9ef45155dd 🔧 chore(cpp): trim clang-format to intentional google deviations
- keep only the options that differ from Google style, each annotated with
  the Google default, so every override carries its own rationale
- switch to Allman braces and a 120 column limit; short functions now
  collapse only when declared inline
- dropped overrides fall back to Google behaviour, which turns include
  sorting, argument binpacking, comment reflow and namespace comment
  fixing back on
- drop a stray trailing blank line in .clangd
2026-07-29 15:45:48 +08:00

12 lines
479 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
Language: Cpp
BasedOnStyle: Google
# --- intentional deviations from Google C++ defaults ---
ColumnLimit: 120 # Google: 80
IndentWidth: 4 # Google: 2
TabWidth: 4 # Google/LLVM: 8UseTab: Never 时几乎无感,与缩进对齐)
AccessModifierOffset: -4 # Google: -1(配合 IndentWidth 4,使 public/private 与 class 同级)
BreakBeforeBraces: Allman # Google: Attach
AllowShortFunctionsOnASingleLine: Inline # 需要显示Inline