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

Issue 781015 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 26
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: ----
Type: Bug

Blocked on:
issue 768586



Sign in to add a comment

clang-format quality problem - interface defaults in Java

Project Member Reported by dtrainor@chromium.org, Nov 2 2017

Issue description

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

Here's the code before formatting:

/**
 * FeedbackReporter enables Chrome to send feedback to the feedback server.
 */
public interface FeedbackReporter {
    /**
     * Report feedback to the feedback server.
     *
     * @param collector the {@link FeedbackCollector} to use for extra data.
     */
    default void reportFeedback(FeedbackCollector collector) {}
}

Here's the code after formatting:

/**
 * FeedbackReporter enables Chrome to send feedback to the feedback server.
 */
public interface FeedbackReporter {
    /**
     * Report feedback to the feedback server.
     *
     * @param collector the {@link FeedbackCollector} to use for extra data.
     */
    default void
        reportFeedback(FeedbackCollector collector) {}
}


Here's how it ought to look:

/**
 * FeedbackReporter enables Chrome to send feedback to the feedback server.
 */
public interface FeedbackReporter {
    /**
     * Report feedback to the feedback server.
     *
     * @param collector the {@link FeedbackCollector} to use for extra data.
     */
    default void reportFeedback(FeedbackCollector collector) {}
}

Code review link for full files/context:
https://chromium-review.googlesource.com/c/chromium/src/+/726821
 
Summary: clang-format quality problem - interface defaults in Java (was: clang-format quality problem)

Comment 2 by thakis@chromium.org, Jan 22 2018

Labels: clang-format

Comment 3 by thakis@chromium.org, Jan 23 2018

 Issue 781018  has been merged into this issue.

Comment 4 by thakis@chromium.org, Jan 23 2018

Blockedon: 768586
Fixed in http://llvm.org/viewvc/llvm-project?view=revision&revision=323218 , just needs a clang-format roll.
Status: Assigned (was: Untriaged)
Owner: ----
Owner: thakis@chromium.org
Status: Fixed (was: Assigned)
A clang-format with the fix got deployed on Nov 21 2018.

Sign in to add a comment