Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{clang-format} Format the components. #6347

Merged
merged 5 commits into from
Jan 23, 2019
Merged

{clang-format} Format the components. #6347

merged 5 commits into from
Jan 23, 2019

Conversation

romoore
Copy link
Contributor

@romoore romoore commented Jan 16, 2019

This is a follow-up to #6027

find components \( -name "*.h" -or -name "*.m" \) | xargs clang-format -i

@romoore romoore added the type:Internal cleanup Refactoring work is required. label Jan 16, 2019
@romoore romoore requested review from yarneo, codeman7 and a team January 16, 2019 13:46
@material-automation
Copy link

This PR affects multiple components.

@romoore romoore closed this Jan 16, 2019
@romoore romoore deleted the clang-format-all branch January 16, 2019 19:48
@romoore romoore restored the clang-format-all branch January 16, 2019 21:30
@romoore romoore reopened this Jan 16, 2019
@"Irony",
@"Gastropub",
@"Truffaut"
@"Truffaut", @"Farm-to-table", @"XOXO", @"Chillwave", @"Fanny", @"Pack",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the right way?

@@ -124,7 +112,7 @@ + (void)applySemanticColorScheme:(nonnull id<MDCColorScheming>)colorScheme

+ (void)resetUIControlStatesForChipTheming:(nonnull MDCChipView *)chipView {
NSUInteger maximumStateValue = UIControlStateNormal | UIControlStateSelected |
UIControlStateHighlighted | UIControlStateDisabled;
UIControlStateHighlighted | UIControlStateDisabled;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it matches how we've done logical/arithmetic operators across multiple lines in other places.

UIColor *customBackgroundColor =
[_delegate collectionView:_collectionView cellBackgroundColorAtIndexPath:attr.indexPath];
UIColor *customBackgroundColor = [_delegate collectionView:_collectionView
cellBackgroundColorAtIndexPath:attr.indexPath];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is aligning the colons, so it makes sense if the method invocation starts on the preceding line.

@romoore romoore requested review from codeman7, jverkoey and a team as code owners January 23, 2019 13:44
@material-automation
Copy link

This PR affects multiple components.

@material-automation
Copy link

This PR affects multiple components.

@romoore
Copy link
Contributor Author

romoore commented Jan 23, 2019

Ready for re-review

@romoore romoore merged commit 800188a into material-components:develop Jan 23, 2019
@romoore romoore deleted the clang-format-all branch January 23, 2019 16:08
romoore pushed a commit that referenced this pull request Jan 23, 2019
This is a follow-up to #6027

```
find components \( -name "*.h" -or -name "*.m" \) | xargs clang-format -i
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment