New issue
Advanced search Search tips

Issue 850843 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 21
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Files.App test code JS auto formatter needs improvement

Project Member Reported by noel@chromium.org, Jun 8 2018

Issue description

There are cases where the 'git cl format --js blah' results are not so great for our Files.App test code in some cases.

We should have a way to tell the formatter to "please leave this section of the code alone: we are very happy with the hand-written format thanks".


 
Cc: noel@chromium.org
Labels: CrOSFilesCategory-Testing
Status: Available (was: Untriaged)
Cc: -sashab@chromium.org calamity@chromium.org
+calamity does this affect you sometimes.
    // clang-format off
    a = [
      'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a',


      'a', 'a', 'a', 'a', 'a', 'a',
      'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a',
    ];
    // clang-format on

That'll do it.
Labels: OS-Chrome
Status: Fixed (was: Available)
Coolio, adding that to our docs.
Status: Started (was: Fixed)
Owner: noel@chromium.org
Project Member

Comment 7 by bugdroid1@chromium.org, Sep 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/32be5d8a20a0f9d3ddaf0b574b9e639eec38738c

commit 32be5d8a20a0f9d3ddaf0b574b9e639eec38738c
Author: Noel Gordon <noel@chromium.org>
Date: Fri Sep 21 08:44:28 2018

gear_menus.js: add a trailing comma to preserve list style

The JS auto-formatter will keep "list-style" iff Object or Array lists
have a trailing comma.

Bug:  850843 
Change-Id: I35a7898524d2db824cebdb7dff4dec95c3c153c8
Reviewed-on: https://chromium-review.googlesource.com/1237756
Reviewed-by: Stuart Langley <slangley@chromium.org>
Reviewed-by: Noel Gordon <noel@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593123}
[modify] https://crrev.com/32be5d8a20a0f9d3ddaf0b574b9e639eec38738c/ui/file_manager/integration_tests/file_manager/gear_menu.js

Status: Fixed (was: Started)

Sign in to add a comment