mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 15:19:41 +00:00
final
-> var
for analyzer_utilities
As per, https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/doc/implementation/coding_style.md#local-variables Change-Id: Ib286a522351460abeca228fabc3b3bc6c57e3421 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346081 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Samuel Rawlins <srawlins@google.com> Commit-Queue: Phil Quitslund <pquitslund@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
df5a3d8678
commit
cde2b1acf9
|
@ -73,7 +73,7 @@ class Element extends Node {
|
|||
List<Element> get children => nodes.whereType<Element>().toList();
|
||||
|
||||
List<String> get classes {
|
||||
final classes = attributes['class'];
|
||||
var classes = attributes['class'];
|
||||
if (classes != null) {
|
||||
return classes.split(' ').toList();
|
||||
} else {
|
||||
|
|
|
@ -12,7 +12,7 @@ import 'html_dom.dart';
|
|||
|
||||
/// Given HTML text, return a parsed HTML tree.
|
||||
Document parse(String htmlContents, Uri uri) {
|
||||
final RegExp commentRegex = RegExp(r'<!--[^>]+-->');
|
||||
RegExp commentRegex = RegExp(r'<!--[^>]+-->');
|
||||
|
||||
Element createElement(XmlElement xmlElement) {
|
||||
// element
|
||||
|
|
|
@ -28,8 +28,8 @@ String get packageRoot {
|
|||
// Try google3 environment. We expect that all packages that will be
|
||||
// accessed via this root are configured in the BUILD file, and located
|
||||
// inside this single root.
|
||||
final runFiles = Platform.environment['TEST_SRCDIR'];
|
||||
final analyzerPackagesRoot = Platform.environment['ANALYZER_PACKAGES_ROOT'];
|
||||
var runFiles = Platform.environment['TEST_SRCDIR'];
|
||||
var analyzerPackagesRoot = Platform.environment['ANALYZER_PACKAGES_ROOT'];
|
||||
if (runFiles != null && analyzerPackagesRoot != null) {
|
||||
return pathos.join(runFiles, analyzerPackagesRoot);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ class VerifyTests {
|
|||
resourceProvider: provider,
|
||||
includedPaths: <String>[testDirPath],
|
||||
excludedPaths: excludedPaths);
|
||||
final singleAnalysisContext = collection.contexts
|
||||
var singleAnalysisContext = collection.contexts
|
||||
.where(analysisContextPredicate ?? (_) => true)
|
||||
.toList()
|
||||
.singleOrNull;
|
||||
|
|
Loading…
Reference in a new issue