New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 793165 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

clang-format quality problem

Project Member Reported by sczs@chromium.org, Dec 8 2017

Issue description

clang-format produced code that (choose all that apply): 
- Doesn't match Chromium style
It goes over 80 lines

Here's the code before formatting:
  [UIViewPropertyAnimator
      runningPropertyAnimatorWithDuration:ios::material::kDuration2
                                    delay:0
                                  options:UIViewAnimationOptionCurveEaseIn
                               animations:^{
                                 [self
                                     setHorizontalTranslationOffset:
                                         kToolbarButtonAnimationOffset
                                                         forButtons:
                                                 self.leadingStackViewButtons];
                                 [self
                                     setHorizontalTranslationOffset:
                                         -kToolbarButtonAnimationOffset
                                                         forButtons:
                                                self.trailingStackViewButtons];
                                 [self setAllVisibleToolbarButtonsOpacity:0];
                               }
                               completion:nil];

Here's the code after formatting:
  [UIViewPropertyAnimator
      runningPropertyAnimatorWithDuration:ios::material::kDuration2
                                    delay:0
                                  options:UIViewAnimationOptionCurveEaseIn
                               animations:^{
                                 [self
                                     setHorizontalTranslationOffset:
                                         kToolbarButtonAnimationOffset
                                                         forButtons:
                                                             self.leadingStackViewButtons];
                                 [self
                                     setHorizontalTranslationOffset:
                                         -kToolbarButtonAnimationOffset
                                                         forButtons:
                                                             self.trailingStackViewButtons];
                                 [self setAllVisibleToolbarButtonsOpacity:0];
                               }
                               completion:nil];
Here's a screenshot of the same:
https://drive.google.com/open?id=1G2J2fxaMMGzis2jznd6SO7C2ASmsEhKP

Code review link for full files/context:
https://chromium-review.googlesource.com/c/chromium/src/+/816055/3/ios/chrome/browser/ui/toolbar/clean/toolbar_view_controller.mm
(Lines 150 and 156, Code was formatted manually to meet 80 lines.)
 

Comment 1 by sczs@chromium.org, Dec 8 2017

Description: Show this description

Comment 2 by sczs@chromium.org, Dec 8 2017

Description: Show this description
Labels: clang-format Pri-3

Sign in to add a comment