Skip to content

Commit

Permalink
Make .clang-format files smaller after clang-format roll
Browse files Browse the repository at this point in the history
-style=Chromium now enables include sorting implicitly, so no need to
turn that on explicitly anymore. Likewise,
AllowShortFunctionsOnASingleLine now defaults to Empty.

Finally, all grit instructions in .js files are now in comments (when
they can be), so `JavaScriptQuotes: Leave` is no longer needed either.

No intended behavior change.

Based on https://crrev.com/2729033002/ by Nico <thakis@chromium.org>

BUG=567770
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2745303002
Cr-Commit-Position: refs/heads/master@{#457024}
  • Loading branch information
danbeam authored and Commit bot committed Mar 15, 2017
1 parent dbc2181 commit 8d9c69e
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 20 deletions.
3 changes: 0 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ BasedOnStyle: Chromium
# 'int>>' if the file already contains at least one such instance.)
Standard: Cpp11

# TODO(thakis): Default this to true in -style=Chromium if we decide to keep it.
SortIncludes: true

# Make sure code like:
# IPC_BEGIN_MESSAGE_MAP()
# IPC_MESSAGE_HANDLER(WidgetHostViewHost_Update, OnUpdate)
Expand Down
8 changes: 0 additions & 8 deletions chrome/browser/resources/.clang-format

This file was deleted.

5 changes: 5 additions & 0 deletions components/dom_distiller/core/javascript/domdistiller.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
try {
function initialize() {
// This include will be processed at build time by grit.
// Note: this <include> is not behind a single-line comment because the
// first line of the file is source code (so the first line would be
// skipped) instead of a licence header.
// clang-format off
<include src="../../../../third_party/dom_distiller_js/dist/js/domdistiller.js"/>
// clang-format on
}
window.setTimeout = function() {};
window.clearTimeout = function() {};
Expand Down
7 changes: 6 additions & 1 deletion ui/keyboard/resources/locales/en.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Note: this <include> is not behind a single-line comment because the first
// line of the file is source code (so the first line would be skipped) instead
// of a licence header. Also, the result is used in an assignment.
// clang-format off
i18n.input.chrome.inputview.TranslationTable =
<include src="../../../../third_party/google_input_tools/src/chrome/os/inputview/_locales/en/messages.json">

// clang-format on
8 changes: 0 additions & 8 deletions ui/webui/resources/.clang-format

This file was deleted.

6 changes: 6 additions & 0 deletions ui/webui/resources/js/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@
// This file serves as a proxy to bring the included js file from /third_party
// into its correct location under the resources directory tree, whence it is
// delivered via a chrome://resources URL. See ../webui_resources.grd.

// Note: this <include> is not behind a single-line comment because the first
// line of the file is source code (so the first line would be skipped) instead
// of a licence header.
// clang-format off
<include src="../../../../third_party/analytics/google-analytics-bundle.js">
// clang-format on
6 changes: 6 additions & 0 deletions ui/webui/resources/js/jstemplate_compiled.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@
// This file serves as a proxy to bring the included js file from /third_party
// into its correct location under the resources directory tree, whence it is
// delivered via a chrome://resources URL. See ../webui_resources.grd.

// Note: this <include> is not behind a single-line comment because the first
// line of the file is source code (so the first line would be skipped) instead
// of a licence header.
// clang-format off
<include src="../../../../third_party/jstemplate/jstemplate_compiled.js">
// clang-format on

0 comments on commit 8d9c69e

Please sign in to comment.