New issue
Advanced search Search tips

Issue 690581 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

[git cl format] Formatting of ObjC methods w/o text before : formats poorly.

Project Member Reported by pkl@chromium.org, Feb 9 2017

Issue description

Some iOS API have method signatures without text before :. For example, CAMediaTimingFunction initWithControlPoints:::: (see https://developer.apple.com/reference/quartzcore/camediatimingfunction/1522235-initwithcontrolpoints)

Human format would look like this:
[[CAMediaTimingFunction alloc] initWithControlPoints:0.0f :0.84f :0.13f :0.99f]

git cl format generated this:
  return [[CAMediaTimingFunction alloc] initWithControlPoints:
                                                         0.0f:
                                                        0.84f:
                                                        0.13f:0.99f];

 
I know about this bug, but I had no idea that there are actually Cocoa APIs that use this obscure spelling (a new api even). What were they thinking! Thanks for the report.

Comment 3 by pkl@chromium.org, Feb 9 2017

Cc: -thakis@chromium.org
Owner: thakis@chromium.org
Status: Assigned (was: Untriaged)
Yes, that's a very silly looking API :(
Components: Infra>Client>Chrome
Components: -Infra>Client>iOS
Moved all Infra>Client>iOS bugs to Infra>Client>Chrome + OS-iOS.
Cc: -lod@chromium.org
      return [[CAMediaTimingFunction alloc] initWithControlPoints:                                                  
                                                             0.0f:
                                                             0.0f:
                                                             0.2f:1.0f];
Is now:

      return [[CAMediaTimingFunction alloc]
          initWithControlPoints:
                           0.0f:0.84f:0.13f:0.99f];


I'm not sure if this is fixed.

Sign in to add a comment