Enable no_leading_underscores_for_local_identifiers (#96422)
This commit is contained in:
committed by
GitHub
parent
53ca7f684a
commit
5684b9f69e
@@ -351,7 +351,7 @@ class BlinkTraceSummary {
|
||||
averageBeginFrameTime: _computeAverageDuration(frames.map((BlinkFrame frame) => frame.beginFrame).whereType<BlinkTraceEvent>().toList()),
|
||||
averageUpdateLifecyclePhasesTime: _computeAverageDuration(frames.map((BlinkFrame frame) => frame.updateAllLifecyclePhases).whereType<BlinkTraceEvent>().toList()),
|
||||
);
|
||||
} catch (_, __) {
|
||||
} catch (_) {
|
||||
final io.File traceFile = io.File('./chrome-trace.json');
|
||||
io.stderr.writeln('Failed to interpret the Chrome trace contents. The trace was saved in ${traceFile.path}');
|
||||
traceFile.writeAsStringSync(const JsonEncoder.withIndent(' ').convert(traceJson));
|
||||
|
||||
@@ -177,12 +177,12 @@ class GalleryTransitionTest {
|
||||
}
|
||||
|
||||
int _countMissedTransitions(Map<String, List<int>> transitions) {
|
||||
const int _kTransitionBudget = 100000; // µs
|
||||
const int kTransitionBudget = 100000; // µs
|
||||
int count = 0;
|
||||
transitions.forEach((String demoName, List<int> durations) {
|
||||
final int longestDuration = durations.reduce(math.max);
|
||||
if (longestDuration > _kTransitionBudget) {
|
||||
print('$demoName missed transition time budget ($longestDuration µs > $_kTransitionBudget µs)');
|
||||
if (longestDuration > kTransitionBudget) {
|
||||
print('$demoName missed transition time budget ($longestDuration µs > $kTransitionBudget µs)');
|
||||
count++;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@ import 'package:http/testing.dart';
|
||||
import 'common.dart';
|
||||
|
||||
void main() {
|
||||
late ProcessResult _processResult;
|
||||
late ProcessResult processResult;
|
||||
ProcessResult runSyncStub(String executable, List<String> args,
|
||||
{Map<String, String>? environment,
|
||||
bool includeParentEnvironment = true,
|
||||
@@ -24,7 +24,7 @@ void main() {
|
||||
Encoding? stderrEncoding,
|
||||
Encoding? stdoutEncoding,
|
||||
String? workingDirectory}) =>
|
||||
_processResult;
|
||||
processResult;
|
||||
|
||||
// Expected test values.
|
||||
const String commitSha = 'a4952838bf288a81d8ea11edfd4b4cd649fa94cc';
|
||||
@@ -45,7 +45,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('returns expected commit sha', () {
|
||||
_processResult = ProcessResult(1, 0, commitSha, '');
|
||||
processResult = ProcessResult(1, 0, commitSha, '');
|
||||
cocoon = Cocoon(
|
||||
serviceAccountTokenPath: serviceAccountTokenPath,
|
||||
fs: fs,
|
||||
@@ -57,7 +57,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('throws exception on git cli errors', () {
|
||||
_processResult = ProcessResult(1, 1, '', '');
|
||||
processResult = ProcessResult(1, 1, '', '');
|
||||
cocoon = Cocoon(
|
||||
serviceAccountTokenPath: serviceAccountTokenPath,
|
||||
fs: fs,
|
||||
@@ -69,7 +69,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('writes expected update task json', () async {
|
||||
_processResult = ProcessResult(1, 0, commitSha, '');
|
||||
processResult = ProcessResult(1, 0, commitSha, '');
|
||||
final TaskResult result = TaskResult.fromJson(<String, dynamic>{
|
||||
'success': true,
|
||||
'data': <String, dynamic>{
|
||||
@@ -105,7 +105,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('uploads metrics sends expected post body', () async {
|
||||
_processResult = ProcessResult(1, 0, commitSha, '');
|
||||
processResult = ProcessResult(1, 0, commitSha, '');
|
||||
const String uploadMetricsRequestWithSpaces =
|
||||
'{"CommitBranch":"master","CommitSha":"a4952838bf288a81d8ea11edfd4b4cd649fa94cc","BuilderName":"builder a b c","NewStatus":"Succeeded","ResultData":{},"BenchmarkScoreKeys":[],"TestFlaky":false}';
|
||||
final MockClient client = MockClient((Request request) async {
|
||||
@@ -136,7 +136,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('uploads expected update task payload from results file', () async {
|
||||
_processResult = ProcessResult(1, 0, commitSha, '');
|
||||
processResult = ProcessResult(1, 0, commitSha, '');
|
||||
cocoon = Cocoon(
|
||||
fs: fs,
|
||||
httpClient: mockClient,
|
||||
@@ -168,7 +168,7 @@ void main() {
|
||||
}
|
||||
});
|
||||
|
||||
_processResult = ProcessResult(1, 0, commitSha, '');
|
||||
processResult = ProcessResult(1, 0, commitSha, '');
|
||||
cocoon = Cocoon(
|
||||
fs: fs,
|
||||
httpClient: mockClient,
|
||||
@@ -202,7 +202,7 @@ void main() {
|
||||
}
|
||||
});
|
||||
|
||||
_processResult = ProcessResult(1, 0, commitSha, '');
|
||||
processResult = ProcessResult(1, 0, commitSha, '');
|
||||
cocoon = Cocoon(
|
||||
fs: fs,
|
||||
httpClient: mockClient,
|
||||
@@ -237,7 +237,7 @@ void main() {
|
||||
}
|
||||
});
|
||||
|
||||
_processResult = ProcessResult(1, 0, commitSha, '');
|
||||
processResult = ProcessResult(1, 0, commitSha, '');
|
||||
cocoon = Cocoon(
|
||||
fs: fs,
|
||||
httpClient: mockClient,
|
||||
@@ -270,7 +270,7 @@ void main() {
|
||||
}
|
||||
});
|
||||
|
||||
_processResult = ProcessResult(1, 0, commitSha, '');
|
||||
processResult = ProcessResult(1, 0, commitSha, '');
|
||||
cocoon = Cocoon(
|
||||
fs: fs,
|
||||
httpClient: mockClient,
|
||||
|
||||
Reference in New Issue
Block a user