mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove .clang-format overrides (#41025)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41025 Align all code on the shared .clang-format in the repo root. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D50322323 fbshipit-source-id: 1e10231c92072527fc5eaa5de7328ab7b400ad85
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8c36aaa2db
commit
168b802a52
-91
@@ -1,91 +0,0 @@
|
||||
---
|
||||
AccessModifierOffset: -1
|
||||
AlignAfterOpenBracket: AlwaysBreak
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlinesLeft: true
|
||||
AlignOperands: false
|
||||
AlignTrailingComments: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakStringLiterals: false
|
||||
ColumnLimit: 80
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ForEachMacros: [ FOR_EACH_RANGE, FOR_EACH, ]
|
||||
IncludeCategories:
|
||||
- Regex: '^<.*\.h(pp)?>'
|
||||
Priority: 1
|
||||
- Regex: '^<.*'
|
||||
Priority: 2
|
||||
- Regex: '.*'
|
||||
Priority: 3
|
||||
IndentCaseLabels: true
|
||||
IndentWidth: 2
|
||||
IndentWrappedFunctionNames: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCSpaceAfterProperty: true
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakBeforeFirstCallParameter: 1
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 200
|
||||
PointerAlignment: Right
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp11
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
---
|
||||
Language: ObjC
|
||||
ColumnLimit: 120
|
||||
BreakBeforeBraces: WebKit
|
||||
...
|
||||
@@ -1,87 +0,0 @@
|
||||
---
|
||||
AccessModifierOffset: -1
|
||||
AlignAfterOpenBracket: AlwaysBreak
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlinesLeft: true
|
||||
AlignOperands: false
|
||||
AlignTrailingComments: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakStringLiterals: false
|
||||
ColumnLimit: 80
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ForEachMacros: [ FOR_EACH_RANGE, FOR_EACH, ]
|
||||
IncludeCategories:
|
||||
- Regex: '^<.*\.h(pp)?>'
|
||||
Priority: 1
|
||||
- Regex: '^<.*'
|
||||
Priority: 2
|
||||
- Regex: '.*'
|
||||
Priority: 3
|
||||
IndentCaseLabels: true
|
||||
IndentWidth: 2
|
||||
IndentWrappedFunctionNames: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: false
|
||||
PenaltyBreakBeforeFirstCallParameter: 1
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 200
|
||||
PointerAlignment: Right
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp11
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
...
|
||||
+3
-3
@@ -61,7 +61,7 @@ void LocalConnection::disconnect() {
|
||||
} // namespace
|
||||
|
||||
ConnectionDemux::ConnectionDemux(
|
||||
facebook::react::jsinspector_modern::IInspector &inspector)
|
||||
facebook::react::jsinspector_modern::IInspector& inspector)
|
||||
: globalInspector_(inspector),
|
||||
inspectedContexts_(std::make_shared<std::unordered_set<std::string>>()) {}
|
||||
|
||||
@@ -69,7 +69,7 @@ ConnectionDemux::~ConnectionDemux() = default;
|
||||
|
||||
DebugSessionToken ConnectionDemux::enableDebugging(
|
||||
std::unique_ptr<RuntimeAdapter> adapter,
|
||||
const std::string &title) {
|
||||
const std::string& title) {
|
||||
std::scoped_lock lock(mutex_);
|
||||
|
||||
// TODO(#22976087): workaround for ComponentScript contexts never being
|
||||
@@ -112,7 +112,7 @@ int ConnectionDemux::addPage(
|
||||
// require a copyable callback?
|
||||
std::shared_ptr<IRemoteConnection> sharedConn = std::move(remoteConn);
|
||||
if (!conn->registerCallbacks(
|
||||
[sharedConn](const std::string &message) {
|
||||
[sharedConn](const std::string& message) {
|
||||
sharedConn->onMessage(message);
|
||||
},
|
||||
[sharedConn]() { sharedConn->onDisconnect(); })) {
|
||||
|
||||
@@ -34,15 +34,15 @@ namespace chrome {
|
||||
class ConnectionDemux {
|
||||
public:
|
||||
explicit ConnectionDemux(
|
||||
facebook::react::jsinspector_modern::IInspector &inspector);
|
||||
facebook::react::jsinspector_modern::IInspector& inspector);
|
||||
~ConnectionDemux();
|
||||
|
||||
ConnectionDemux(const ConnectionDemux &) = delete;
|
||||
ConnectionDemux &operator=(const ConnectionDemux &) = delete;
|
||||
ConnectionDemux(const ConnectionDemux&) = delete;
|
||||
ConnectionDemux& operator=(const ConnectionDemux&) = delete;
|
||||
|
||||
DebugSessionToken enableDebugging(
|
||||
std::unique_ptr<RuntimeAdapter> adapter,
|
||||
const std::string &title);
|
||||
const std::string& title);
|
||||
void disableDebugging(DebugSessionToken session);
|
||||
|
||||
private:
|
||||
@@ -50,7 +50,7 @@ class ConnectionDemux {
|
||||
std::shared_ptr<hermes::inspector_modern::chrome::CDPHandler> conn);
|
||||
void removePage(int pageId);
|
||||
|
||||
facebook::react::jsinspector_modern::IInspector &globalInspector_;
|
||||
facebook::react::jsinspector_modern::IInspector& globalInspector_;
|
||||
|
||||
std::mutex mutex_;
|
||||
std::unordered_map<
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace chrome {
|
||||
|
||||
namespace {
|
||||
|
||||
ConnectionDemux &demux() {
|
||||
ConnectionDemux& demux() {
|
||||
static ConnectionDemux instance{
|
||||
facebook::react::jsinspector_modern::getInspectorInstance()};
|
||||
return instance;
|
||||
@@ -27,7 +27,7 @@ ConnectionDemux &demux() {
|
||||
|
||||
DebugSessionToken enableDebugging(
|
||||
std::unique_ptr<RuntimeAdapter> adapter,
|
||||
const std::string &title) {
|
||||
const std::string& title) {
|
||||
return demux().enableDebugging(std::move(adapter), title);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ using DebugSessionToken = int;
|
||||
*/
|
||||
extern DebugSessionToken enableDebugging(
|
||||
std::unique_ptr<RuntimeAdapter> adapter,
|
||||
const std::string &title);
|
||||
const std::string& title);
|
||||
|
||||
/*
|
||||
* disableDebugging removes this runtime from the list of debuggable JS targets
|
||||
|
||||
+4
-4
@@ -29,10 +29,10 @@ using ::facebook::react::jsinspector_modern::IRemoteConnection;
|
||||
namespace {
|
||||
|
||||
std::unordered_map<int, std::string> makePageMap(
|
||||
const std::vector<InspectorPage> &pages) {
|
||||
const std::vector<InspectorPage>& pages) {
|
||||
std::unordered_map<int, std::string> pageMap;
|
||||
|
||||
for (auto &page : pages) {
|
||||
for (auto& page : pages) {
|
||||
pageMap[page.id] = page.title;
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ std::unordered_map<int, std::string> makePageMap(
|
||||
}
|
||||
|
||||
void expectPages(
|
||||
IInspector &inspector,
|
||||
const std::unordered_map<int, std::string> &expected) {
|
||||
IInspector& inspector,
|
||||
const std::unordered_map<int, std::string>& expected) {
|
||||
auto pages = makePageMap(inspector.getPages());
|
||||
EXPECT_EQ(pages, expected);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user