This prevents bugs where the indentation formatting code is mistakenly executed with declarations that are not Objective-C methods.
Since this formatting code was designed for only those kinds of method declarations, this added check will enforce this requirement more strictly, preventing bugs where this code may currently execute with other kinds of Objective-C (or other C family) symbols.
Testing
Steps:
Verify that there are no regressions with the way that Objective-C instance/class methods are formatted—the colon character is aligned across multiple lines when methods have multiple parameters.
Verify that there are no unexpected newlines introduced for other kinds of C-family declarations that may have parameters but aren't Objective-C instance/class methods (specific example: C++ functions with namespaced parameters)
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
Bug/issue #, if applicable: 129590639
Summary
This prevents bugs where the indentation formatting code is mistakenly executed with declarations that are not Objective-C methods.
Since this formatting code was designed for only those kinds of method declarations, this added check will enforce this requirement more strictly, preventing bugs where this code may currently execute with other kinds of Objective-C (or other C family) symbols.
Testing
Steps:
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
npm test
, and it succeeded