Consistent QualifierAlignment (#39217)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39217 React Native uses an inconsistent mix of "west const" and "east const". E.g. `const auto &` in 74 files, but `auto const &` in 60. Sometimes they are mixed from one line to the next: {F1079102436} Clang format 14 adds a QualifierAlignment option, but fbsource is still on 12, so we cannot use it in our config until the [world is updated]()https://fb.workplace.com/groups/toolchain.fndn/posts/24006558685624673/?comment_id=24009214565359085&reply_comment_id=24009455088668366. This diff just runs a local version of Clang format locally first to fix QualifierAlignment, then reformats with the fbsource version, to fix any other output differences unrelated to that. This will not continually enforce a style, but will make the world more consistent, and hopefully encourage a consistent style until we can set it. West const seems more popular in `//xplat` so I just picked left alignment somewhat arbitrarily, but we could also maybe take a poll on this. Changelog: [Internal] Reviewed By: rshest Differential Revision: D48761722 fbshipit-source-id: 06ec2ceddc495b7fed63ce752c1f31de05af5873
This commit is contained in:
Родитель
5f1404de02
Коммит
759cfaaee6
|
@ -84,6 +84,7 @@ SpacesInSquareBrackets: false
|
|||
Standard: Cpp11
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
QualifierAlignment: Left
|
||||
---
|
||||
Language: ObjC
|
||||
ColumnLimit: 120
|
||||
|
|
Загрузка…
Ссылка в новой задаче