New issue
Advanced search Search tips

Issue 730292 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

git cl format and presubmit checks disagree on Java file formatting

Project Member Reported by carlosk@chromium.org, Jun 7 2017

Issue description

I'm updating the arguments being passed to the CommandLineFlags.Add call [1] in 

src/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtilsTest.java 

When I run git cl format it spews that call this way:

@CommandLineFlags.
Add({"enable-features=OfflinePagesSharing", ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
        ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG})

But then when I try to upload my changes I get the following presubmit errors:

  chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtilsTest.java:46:18: '.' should be on a new line.
  chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtilsTest.java:47: 'Add' have incorrect indentation level 0, expected level should be 8.

Beyond filing this issue so that this inconsistency is addressed I'd also like to know what formatting and procedure should I use now to move on with my CL?


[1] https://cs.chromium.org/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtilsTest.java?q="CommandLineFlags.Add"
 
And as expected, if I "fix" the formatting to comply with what the presubmit errors say then I get a formatting warning while running presubmit again. For now I'm going with this option.

Sign in to add a comment