Skip to contentSkip to conversation

clang-format: don't indent namespaces

PATCH In review Ian Rogers 2 participants 2 messages Apr 9, 2020 – Apr 18, 2020 Clang-format file

lore
Share & tools
lore

Ian Rogers

author
#0 lore raw

PATCH 1/1 clang-format: don't indent namespaces

This change doesn't affect existing code. Inner namespace indentation can lead to a lot of indentation in the case of anonymous namespaces and the like, impeding readability. Of the clang-format builtin styles LLVM, Google, Chromium and Mozilla use None while WebKit uses Inner.

---
 .clang-format | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.clang-format +1 -1
index 6ec5558b516b..2d7754a4b6d8 100644
@@ -482,7 +482,7 @@ KeepEmptyLinesAtTheStartOfBlocks: false
 MacroBlockBegin: ''
 MacroBlockEnd: ''
 MaxEmptyLinesToKeep: 1
-NamespaceIndentation: Inner
+NamespaceIndentation: None
 #ObjCBinPackProtocolList: Auto # Unknown to clang-format-5.0
 ObjCBlockIndentWidth: 8
 ObjCSpaceAfterProperty: true
Signature · 1 line
2.26.0.292.g33ef6b2f38-goog
#1 lore raw

Hi Ian,

Quoted 7 lines · Ian Rogers

This change doesn't affect existing code. Inner namespace indentation can lead to a lot of indentation in the case of anonymous namespaces and the like, impeding readability. Of the clang-format builtin styles LLVM, Google, Chromium and Mozilla use None while WebKit uses Inner.

Picking it up for -rc2/3.

Cheers,
Miguel