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

Issue 764582 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 866014
Owner: ----
Closed: Nov 27
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: ----
Type: Bug



Sign in to add a comment

clang-format quality problem around multi-line nested java lambdas

Project Member Reported by ntfschr@chromium.org, Sep 13 2017

Issue description

clang-format produced code that (choose all that apply): 
- Doesn't match Chromium style
- Doesn't match blink style
X Riles my finely honed stylistic dander
X No sane human would ever choose

*Note* this is Java code, specific to Java lambda expressions.

Here's the code before formatting:
        Callback<AwSafeBrowsingResponse> callback =
                response -> ThreadUtils.runOnUiThread(
                        () -> nativeTakeSafeBrowsingAction(mNativeContentsClientBridge,
                                response.action(), response.reporting(), requestId));

Here's the code after formatting:
        Callback<AwSafeBrowsingResponse> callback = response
                -> ThreadUtils.runOnUiThread(
                        ()
                                -> nativeTakeSafeBrowsingAction(mNativeContentsClientBridge,
                                        response.action(), response.reporting(), requestId));

Here's how it ought to look:
Same as "before formatting."

Code review link for full files/context:

This doesn't prevent uploading, but the formatting looks ridiculous. Let me know if this is WAI.
 
CL: https://chromium-review.googlesource.com/c/chromium/src/+/664182 (search for this bug number)
Components: Tools
Owner: nick@chromium.org
Ping, any update on this?
Owner: ----
Labels: clang-format
Summary: clang-format quality problem around multi-line nested java lambdas (was: clang-format quality problem)
Mergedinto: 866014
Status: Duplicate (was: Available)

Sign in to add a comment