-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get closure-type-checking running again #360
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* @license | ||
* Copyright 2016 Google Inc. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* @externs | ||
*/ | ||
|
||
/** @type {string} */ | ||
var __dirname = ''; | ||
|
||
/** @type {!Object} */ | ||
var global = {}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,7 @@ class Aggregate { | |
*/ | ||
static _filterResultsByAuditNames(results, expected) { | ||
const expectedNames = Object.keys(expected); | ||
return results.filter(r => expectedNames.indexOf(r.name) !== -1); | ||
return results.filter(r => expectedNames.indexOf(/** @type {string} */ (r.name)) !== -1); | ||
} | ||
|
||
/** | ||
|
@@ -206,7 +206,7 @@ class Aggregate { | |
// TODO(paullewis): Remove once coming soon audits have landed. | ||
if (expected[e].comingSoon) { | ||
subItems.push({ | ||
value: String.raw`¯\_(ツ)_/¯`, | ||
value: '¯\\_(ツ)_/¯', // TODO(samthor): Patch going to Closure, String.raw is badly typed | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noooooooooo! Fine. |
||
name: 'coming-soon', | ||
category: expected[e].category, | ||
description: expected[e].description, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ class CriticalRequestChains extends Audit { | |
*/ | ||
static audit(artifacts) { | ||
let chainCount = 0; | ||
function walk(node, depth, startTime) { | ||
function walk(node, depth) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change seems unrelated to the PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mind you, it's fine actually... the fix needs to exist. Go for it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, Closure fails without this fix. That's one of the points of this On Fri., 27 May 2016, 18:53 Paul Lewis, notifications@github.com wrote:
|
||
const children = Object.keys(node); | ||
|
||
// Since a leaf node indicates the end of a chain, we can inspect the number | ||
|
@@ -74,7 +74,7 @@ class CriticalRequestChains extends Audit { | |
|
||
children.forEach(id => { | ||
const child = node[id]; | ||
walk(child.children, depth + 1, startTime); | ||
walk(child.children, depth + 1); | ||
}, ''); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes me sad, but I assume we can remove it as we add annotations to the formatters, etc?