Bug 232073

Summary: Coding style for inner namespaces is should be simplified to not indented
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: Tools / TestsAssignee: Kimmo Kinnunen <kkinnunen>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, koivisto, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Kimmo Kinnunen 2021-10-21 03:08:51 PDT
Coding style for inner namespaces is should be simplified to not indented

https://webkit.org/code-style-guidelines/ says code in inner namespaces should be indented.

Code in inner namespaces are not indented by large.

It is mostly simpler to not indent them.


Poor-mans check:
git grep -3 "namespace [^W].* {" --  "Source/WebKit/*.cpp"
Comment 1 Kimmo Kinnunen 2021-10-21 03:15:56 PDT
Created attachment 442004 [details]
Patch
Comment 2 Alexey Proskuryakov 2021-10-21 14:52:20 PDT
Comment on attachment 442004 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=442004&action=review

> Websites/webkit.org/ChangeLog:3
> +        Coding style for inner namespaces is should be simplified to not indented

We normally discuss coding style changes on WebKit-dev mailing list, would you mind sending the proposal there?
Comment 3 Antti Koivisto 2021-10-22 00:01:14 PDT
This seemed more like a documentation bug fix to match the actual coding style but it is true that it appears to not have been discussed on webkit-dev.
Comment 4 Alex Christensen 2021-10-22 11:26:05 PDT
It might be worth adding an example with C++17 nested namespace syntax, like in https://bugs.webkit.org/show_bug.cgi?id=232162
Comment 5 Radar WebKit Bug Importer 2021-10-28 03:09:18 PDT
<rdar://problem/84749550>
Comment 6 Kimmo Kinnunen 2021-11-09 23:52:53 PST
Created attachment 443779 [details]
Patch
Comment 7 Kimmo Kinnunen 2021-11-10 06:12:26 PST
Created attachment 443807 [details]
Patch
Comment 8 EWS 2021-11-10 11:37:43 PST
Committed r285601 (244105@main): <https://commits.webkit.org/244105@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 443807 [details].