Word substitutions (#59484)
* Word substitutions
* ++
diff --git a/dev/bots/analyze.dart b/dev/bots/analyze.dart
index 71d4647..b0e9353 100644
--- a/dev/bots/analyze.dart
+++ b/dev/bots/analyze.dart
@@ -145,8 +145,8 @@
/// the regexp just above...)
const String _ignoreDeprecation = ' // ignore: flutter_deprecation_syntax (see analyze.dart)';
-/// Some deprecation notices are grand-fathered in for now. They must have an issue listed.
-final RegExp _grandfatheredDeprecation = RegExp(r' // ignore: flutter_deprecation_syntax, https://github.com/flutter/flutter/issues/[0-9]+$');
+/// Some deprecation notices are exempt for historical reasons. They must have an issue listed.
+final RegExp _legacyDeprecation = RegExp(r' // ignore: flutter_deprecation_syntax, https://github.com/flutter/flutter/issues/[0-9]+$');
Future<void> verifyDeprecations(String workingDirectory, { int minimumMatches = 2000 }) async {
final List<String> errors = <String>[];
@@ -157,7 +157,7 @@
for (final String line in lines) {
if (line.contains(_findDeprecationPattern) &&
!line.endsWith(_ignoreDeprecation) &&
- !line.contains(_grandfatheredDeprecation)) {
+ !line.contains(_legacyDeprecation)) {
linesWithDeprecations.add(lineNumber);
}
lineNumber += 1;
@@ -691,7 +691,7 @@
// If you are adding/changing template images, use the flutter_template_images
// package and a .img.tmpl placeholder instead.
// If you have other binaries to add, please consult Hixie for advice.
-final Set<Hash256> _grandfatheredBinaries = <Hash256>{
+final Set<Hash256> _legacyBinaries = <Hash256>{
// DEFAULT ICON IMAGES
// packages/flutter_tools/templates/app/android.tmpl/app/src/main/res/mipmap-hdpi/ic_launcher.png
@@ -1046,18 +1046,18 @@
const Hash256(0x63D2ABD0041C3E3B, 0x4B52AD8D382353B5, 0x3C51C6785E76CE56, 0xED9DACAD2D2E31C4),
};
-Future<void> verifyNoBinaries(String workingDirectory, { Set<Hash256> grandfatheredBinaries }) async {
- // Please do not add anything to the _grandfatheredBinaries set above.
+Future<void> verifyNoBinaries(String workingDirectory, { Set<Hash256> legacyBinaries }) async {
+ // Please do not add anything to the _legacyBinaries set above.
// We have a policy of not checking in binaries into this repository.
// If you are adding/changing template images, use the flutter_template_images
// package and a .img.tmpl placeholder instead.
// If you have other binaries to add, please consult Hixie for advice.
assert(
- _grandfatheredBinaries
+ _legacyBinaries
.expand<int>((Hash256 hash) => <int>[hash.a, hash.b, hash.c, hash.d])
.reduce((int value, int element) => value ^ element) == 0x606B51C908B40BFA // Please do not modify this line.
);
- grandfatheredBinaries ??= _grandfatheredBinaries;
+ legacyBinaries ??= _legacyBinaries;
if (!Platform.isWindows) { // TODO(ianh): Port this to Windows
final EvalResult evalResult = await _evalCommand(
'git', <String>['ls-files', '-z'],
@@ -1087,7 +1087,7 @@
utf8.decode(bytes);
} on FormatException catch (error) {
final Digest digest = sha256.convert(bytes);
- if (!grandfatheredBinaries.contains(Hash256.fromDigest(digest)))
+ if (!legacyBinaries.contains(Hash256.fromDigest(digest)))
problems.add('${file.path}:${error.offset}: file is not valid UTF-8');
}
}
diff --git a/dev/bots/test.dart b/dev/bots/test.dart
index 4a3948d..8e50148 100644
--- a/dev/bots/test.dart
+++ b/dev/bots/test.dart
@@ -82,8 +82,8 @@
/// Tests that we don't run on Web for various reasons.
//
-// TODO(yjbanov): we're getting rid of this blacklist as part of https://github.com/flutter/flutter/projects/60
-const List<String> kWebTestFileBlacklist = <String>[
+// TODO(yjbanov): we're getting rid of this as part of https://github.com/flutter/flutter/projects/60
+const List<String> kWebTestFileKnownFailures = <String>[
// This test doesn't compile because it depends on code outside the flutter package.
'test/examples/sector_layout_test.dart',
// This test relies on widget tracking capability in the VM.
@@ -699,7 +699,7 @@
)
.whereType<File>()
.map<String>((File file) => path.relative(file.path, from: flutterPackageDirectory.path))
- .where((String filePath) => !kWebTestFileBlacklist.contains(filePath))
+ .where((String filePath) => !kWebTestFileKnownFailures.contains(filePath))
.toList()
// Finally we shuffle the list because we want the average cost per file to be uniformly
// distributed. If the list is not sorted then different shards and batches may have
diff --git a/dev/bots/test/analyze_test.dart b/dev/bots/test/analyze_test.dart
index cc34b85..faba5bb 100644
--- a/dev/bots/test/analyze_test.dart
+++ b/dev/bots/test/analyze_test.dart
@@ -95,7 +95,7 @@
test('analyze.dart - verifyNoBinaries - positive', () async {
final String result = await capture(() => verifyNoBinaries(
testRootPath,
- grandfatheredBinaries: <Hash256>{const Hash256(0x39A050CD69434936, 0, 0, 0)},
+ legacyBinaries: <Hash256>{const Hash256(0x39A050CD69434936, 0, 0, 0)},
), exitCode: Platform.isWindows ? 0 : 1);
if (!Platform.isWindows) {
// The output starts with the call to git ls-files, the details of which
@@ -116,7 +116,7 @@
test('analyze.dart - verifyNoBinaries - negative', () async {
await capture(() => verifyNoBinaries(
testRootPath,
- grandfatheredBinaries: <Hash256>{
+ legacyBinaries: <Hash256>{
const Hash256(0xA8100AE6AA1940D0, 0xB663BB31CD466142, 0xEBBDBD5187131B92, 0xD93818987832EB89), // sha256("\xff")
const Hash256(0x155644D3F13D98BF, 0, 0, 0),
},
diff --git a/dev/devicelab/bin/tasks/technical_debt__cost.dart b/dev/devicelab/bin/tasks/technical_debt__cost.dart
index 8f04c69..6d028ab 100644
--- a/dev/devicelab/bin/tasks/technical_debt__cost.dart
+++ b/dev/devicelab/bin/tasks/technical_debt__cost.dart
@@ -18,7 +18,7 @@
const double ignoreForFileCost = 2477.0; // similar thinking as skipCost
const double asDynamicCost = 2011.0; // a few days to refactor the code.
const double deprecationCost = 233.0; // a few hours to remove the old code.
-const double grandfatheredDeprecationCost = 9973.0; // a couple of weeks.
+const double legacyDeprecationCost = 9973.0; // a couple of weeks.
final RegExp todoPattern = RegExp(r'(?://|#) *TODO');
final RegExp ignorePattern = RegExp(r'// *ignore:');
@@ -26,7 +26,7 @@
final RegExp asDynamicPattern = RegExp(r'\bas dynamic\b');
final RegExp deprecationPattern = RegExp(r'^ *@[dD]eprecated');
const Pattern globalsPattern = 'globals.';
-const String grandfatheredDeprecationPattern = '// ignore: flutter_deprecation_syntax, https';
+const String legacyDeprecationPattern = '// ignore: flutter_deprecation_syntax, https';
Future<double> findCostsForFile(File file) async {
if (path.extension(file.path) == '.py')
@@ -48,8 +48,8 @@
total += asDynamicCost;
if (line.contains(deprecationPattern))
total += deprecationCost;
- if (line.contains(grandfatheredDeprecationPattern))
- total += grandfatheredDeprecationCost;
+ if (line.contains(legacyDeprecationPattern))
+ total += legacyDeprecationCost;
if (isTest && line.contains('skip:'))
total += skipCost;
}
diff --git a/packages/flutter/lib/src/foundation/debug.dart b/packages/flutter/lib/src/foundation/debug.dart
index c38a7e4..8d6e059 100644
--- a/packages/flutter/lib/src/foundation/debug.dart
+++ b/packages/flutter/lib/src/foundation/debug.dart
@@ -72,11 +72,13 @@
/// Argument passed to [Timeline] events in order to cause those events to be
/// shown in the developer-centric version of the Observatory Timeline.
///
+/// Generally these indicate landmark events such as the build phase or layout.
+///
/// See also:
///
/// * [Timeline.startSync], which typically takes this value as its `arguments`
/// argument.
-const Map<String, String> timelineWhitelistArguments = <String, String>{
+const Map<String, String> timelineArgumentsIndicatingLandmarkEvent = <String, String>{
'mode': 'basic',
};
diff --git a/packages/flutter/lib/src/rendering/binding.dart b/packages/flutter/lib/src/rendering/binding.dart
index 5f78c21..bb6307d 100644
--- a/packages/flutter/lib/src/rendering/binding.dart
+++ b/packages/flutter/lib/src/rendering/binding.dart
@@ -414,7 +414,7 @@
@override
Future<void> performReassemble() async {
await super.performReassemble();
- Timeline.startSync('Dirty Render Tree', arguments: timelineWhitelistArguments);
+ Timeline.startSync('Dirty Render Tree', arguments: timelineArgumentsIndicatingLandmarkEvent);
try {
renderView.reassemble();
} finally {
diff --git a/packages/flutter/lib/src/rendering/object.dart b/packages/flutter/lib/src/rendering/object.dart
index 044a9f4..2ee82d8 100644
--- a/packages/flutter/lib/src/rendering/object.dart
+++ b/packages/flutter/lib/src/rendering/object.dart
@@ -173,7 +173,7 @@
void paintChild(RenderObject child, Offset offset) {
assert(() {
if (debugProfilePaintsEnabled)
- Timeline.startSync('${child.runtimeType}', arguments: timelineWhitelistArguments);
+ Timeline.startSync('${child.runtimeType}', arguments: timelineArgumentsIndicatingLandmarkEvent);
if (debugOnProfilePaint != null)
debugOnProfilePaint(child);
return true;
@@ -873,7 +873,7 @@
/// See [RendererBinding] for an example of how this function is used.
void flushLayout() {
if (!kReleaseMode) {
- Timeline.startSync('Layout', arguments: timelineWhitelistArguments);
+ Timeline.startSync('Layout', arguments: timelineArgumentsIndicatingLandmarkEvent);
}
assert(() {
_debugDoingLayout = true;
@@ -965,7 +965,7 @@
/// See [RendererBinding] for an example of how this function is used.
void flushPaint() {
if (!kReleaseMode) {
- Timeline.startSync('Paint', arguments: timelineWhitelistArguments);
+ Timeline.startSync('Paint', arguments: timelineArgumentsIndicatingLandmarkEvent);
}
assert(() {
_debugDoingPaint = true;
diff --git a/packages/flutter/lib/src/rendering/view.dart b/packages/flutter/lib/src/rendering/view.dart
index 101ba11..0299d92 100644
--- a/packages/flutter/lib/src/rendering/view.dart
+++ b/packages/flutter/lib/src/rendering/view.dart
@@ -226,7 +226,7 @@
///
/// Actually causes the output of the rendering pipeline to appear on screen.
void compositeFrame() {
- Timeline.startSync('Compositing', arguments: timelineWhitelistArguments);
+ Timeline.startSync('Compositing', arguments: timelineArgumentsIndicatingLandmarkEvent);
try {
final ui.SceneBuilder builder = ui.SceneBuilder();
final ui.Scene scene = layer.buildScene(builder);
diff --git a/packages/flutter/lib/src/scheduler/binding.dart b/packages/flutter/lib/src/scheduler/binding.dart
index df2243b..9477eb6 100644
--- a/packages/flutter/lib/src/scheduler/binding.dart
+++ b/packages/flutter/lib/src/scheduler/binding.dart
@@ -994,7 +994,7 @@
/// statements printed during a frame from those printed between frames (e.g.
/// in response to events or timers).
void handleBeginFrame(Duration rawTimeStamp) {
- Timeline.startSync('Frame', arguments: timelineWhitelistArguments);
+ Timeline.startSync('Frame', arguments: timelineArgumentsIndicatingLandmarkEvent);
_firstRawTimeStampInEpoch ??= rawTimeStamp;
_currentFrameTimeStamp = _adjustForEpoch(rawTimeStamp ?? _lastRawTimeStamp);
if (rawTimeStamp != null)
@@ -1021,7 +1021,7 @@
_hasScheduledFrame = false;
try {
// TRANSIENT FRAME CALLBACKS
- Timeline.startSync('Animate', arguments: timelineWhitelistArguments);
+ Timeline.startSync('Animate', arguments: timelineArgumentsIndicatingLandmarkEvent);
_schedulerPhase = SchedulerPhase.transientCallbacks;
final Map<int, _FrameCallbackEntry> callbacks = _transientCallbacks;
_transientCallbacks = <int, _FrameCallbackEntry>{};
diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart
index b5a3137..ff633fe 100644
--- a/packages/flutter/lib/src/widgets/framework.dart
+++ b/packages/flutter/lib/src/widgets/framework.dart
@@ -2603,7 +2603,7 @@
_debugBuilding = true;
return true;
}());
- Timeline.startSync('Build', arguments: timelineWhitelistArguments);
+ Timeline.startSync('Build', arguments: timelineArgumentsIndicatingLandmarkEvent);
try {
_scheduledFlushDirtyElements = true;
if (callback != null) {
@@ -2748,7 +2748,7 @@
/// After the current call stack unwinds, a microtask that notifies listeners
/// about changes to global keys will run.
void finalizeTree() {
- Timeline.startSync('Finalize tree', arguments: timelineWhitelistArguments);
+ Timeline.startSync('Finalize tree', arguments: timelineArgumentsIndicatingLandmarkEvent);
try {
lockState(() {
_inactiveElements._unmountAll(); // this unregisters the GlobalKeys
@@ -4534,7 +4534,7 @@
@override
void performRebuild() {
if (!kReleaseMode && debugProfileBuildsEnabled)
- Timeline.startSync('${widget.runtimeType}', arguments: timelineWhitelistArguments);
+ Timeline.startSync('${widget.runtimeType}', arguments: timelineArgumentsIndicatingLandmarkEvent);
assert(_debugSetAllowIgnoredCallsToMarkNeedsBuild(true));
Widget built;
diff --git a/packages/flutter_tools/lib/src/android/android_device.dart b/packages/flutter_tools/lib/src/android/android_device.dart
index ce53c2a..88f36e6 100644
--- a/packages/flutter_tools/lib/src/android/android_device.dart
+++ b/packages/flutter_tools/lib/src/android/android_device.dart
@@ -270,7 +270,7 @@
workingDirectory: workingDirectory,
allowReentrantFlutter: allowReentrantFlutter,
environment: environment,
- whiteListFailures: (int value) => allowHeapCorruptionOnWindows(value, _platform),
+ allowedFailures: (int value) => allowHeapCorruptionOnWindows(value, _platform),
).stdout.trim();
}
@@ -284,7 +284,7 @@
throwOnError: true,
workingDirectory: workingDirectory,
allowReentrantFlutter: allowReentrantFlutter,
- whiteListFailures: (int value) => allowHeapCorruptionOnWindows(value, _platform),
+ allowedFailures: (int value) => allowHeapCorruptionOnWindows(value, _platform),
);
}
@@ -1077,7 +1077,7 @@
// 'W/ActivityManager(pid): '
static final RegExp _logFormat = RegExp(r'^[VDIWEF]\/.*?\(\s*(\d+)\):\s');
- static final List<RegExp> _whitelistedTags = <RegExp>[
+ static final List<RegExp> _allowedTags = <RegExp>[
RegExp(r'^[VDIWEF]\/flutter[^:]*:\s+', caseSensitive: false),
RegExp(r'^[IE]\/DartVM[^:]*:\s+'),
RegExp(r'^[WEF]\/AndroidRuntime:\s+'),
@@ -1149,7 +1149,7 @@
}
} else {
// Filter on approved names and levels.
- acceptLine = _whitelistedTags.any((RegExp re) => re.hasMatch(line));
+ acceptLine = _allowedTags.any((RegExp re) => re.hasMatch(line));
}
if (acceptLine) {
diff --git a/packages/flutter_tools/lib/src/base/process.dart b/packages/flutter_tools/lib/src/base/process.dart
index ea4e7ef..321e93d 100644
--- a/packages/flutter_tools/lib/src/base/process.dart
+++ b/packages/flutter_tools/lib/src/base/process.dart
@@ -198,9 +198,9 @@
/// When [throwOnError] is `true`, if the child process finishes with a non-zero
/// exit code, a [ProcessException] is thrown.
///
- /// If [throwOnError] is `true`, and [whiteListFailures] is supplied,
+ /// If [throwOnError] is `true`, and [allowedFailures] is supplied,
/// a [ProcessException] is only thrown on a non-zero exit code if
- /// [whiteListFailures] returns false when passed the exit code.
+ /// [allowedFailures] returns false when passed the exit code.
///
/// When [workingDirectory] is set, it is the working directory of the child
/// process.
@@ -219,7 +219,7 @@
Future<RunResult> run(
List<String> cmd, {
bool throwOnError = false,
- RunResultChecker whiteListFailures,
+ RunResultChecker allowedFailures,
String workingDirectory,
bool allowReentrantFlutter = false,
Map<String, String> environment,
@@ -231,7 +231,7 @@
RunResult runSync(
List<String> cmd, {
bool throwOnError = false,
- RunResultChecker whiteListFailures,
+ RunResultChecker allowedFailures,
bool hideStdout = false,
String workingDirectory,
Map<String, String> environment,
@@ -292,7 +292,7 @@
Future<RunResult> run(
List<String> cmd, {
bool throwOnError = false,
- RunResultChecker whiteListFailures,
+ RunResultChecker allowedFailures,
String workingDirectory,
bool allowReentrantFlutter = false,
Map<String, String> environment,
@@ -318,7 +318,7 @@
final RunResult runResult = RunResult(results, cmd);
_logger.printTrace(runResult.toString());
if (throwOnError && runResult.exitCode != 0 &&
- (whiteListFailures == null || !whiteListFailures(runResult.exitCode))) {
+ (allowedFailures == null || !allowedFailures(runResult.exitCode))) {
runResult.throwException('Process exited abnormally:\n$runResult');
}
return runResult;
@@ -382,7 +382,7 @@
if (exitCode != null) {
_logger.printTrace(runResult.toString());
if (throwOnError && runResult.exitCode != 0 &&
- (whiteListFailures == null || !whiteListFailures(exitCode))) {
+ (allowedFailures == null || !allowedFailures(exitCode))) {
runResult.throwException('Process exited abnormally:\n$runResult');
}
return runResult;
@@ -407,7 +407,7 @@
RunResult runSync(
List<String> cmd, {
bool throwOnError = false,
- RunResultChecker whiteListFailures,
+ RunResultChecker allowedFailures,
bool hideStdout = false,
String workingDirectory,
Map<String, String> environment,
@@ -424,8 +424,8 @@
_logger.printTrace('Exit code ${runResult.exitCode} from: ${cmd.join(' ')}');
bool failedExitCode = runResult.exitCode != 0;
- if (whiteListFailures != null && failedExitCode) {
- failedExitCode = !whiteListFailures(runResult.exitCode);
+ if (allowedFailures != null && failedExitCode) {
+ failedExitCode = !allowedFailures(runResult.exitCode);
}
if (runResult.stdout.isNotEmpty && !hideStdout) {
diff --git a/packages/flutter_tools/lib/src/ios/simulators.dart b/packages/flutter_tools/lib/src/ios/simulators.dart
index a37af54..316435d 100644
--- a/packages/flutter_tools/lib/src/ios/simulators.dart
+++ b/packages/flutter_tools/lib/src/ios/simulators.dart
@@ -363,10 +363,10 @@
return false;
}
- // Check if the device is part of a blacklisted category.
+ // Check if the device is part of a blocked category.
// We do not yet support WatchOS or tvOS devices.
- final RegExp blacklist = RegExp(r'Apple (TV|Watch)', caseSensitive: false);
- if (blacklist.hasMatch(name)) {
+ final RegExp blocklist = RegExp(r'Apple (TV|Watch)', caseSensitive: false);
+ if (blocklist.hasMatch(name)) {
_supportMessage = 'Flutter does not support Apple TV or Apple Watch.';
return false;
}
diff --git a/packages/flutter_tools/lib/src/ios/xcodeproj.dart b/packages/flutter_tools/lib/src/ios/xcodeproj.dart
index 08f3625..873c6af 100644
--- a/packages/flutter_tools/lib/src/ios/xcodeproj.dart
+++ b/packages/flutter_tools/lib/src/ios/xcodeproj.dart
@@ -385,7 +385,7 @@
if (projectFilename != null) ...<String>['-project', projectFilename],
],
throwOnError: true,
- whiteListFailures: (int c) => c == missingProjectExitCode,
+ allowedFailures: (int c) => c == missingProjectExitCode,
workingDirectory: projectPath,
);
if (result.exitCode == missingProjectExitCode) {
diff --git a/packages/flutter_tools/test/general.shard/base/process_test.dart b/packages/flutter_tools/test/general.shard/base/process_test.dart
index a64fec0..79b5532 100644
--- a/packages/flutter_tools/test/general.shard/base/process_test.dart
+++ b/packages/flutter_tools/test/general.shard/base/process_test.dart
@@ -161,7 +161,7 @@
throwsA(isA<ProcessException>()));
});
- testWithoutContext(' does not throw on failure with whitelist', () async {
+ testWithoutContext(' does not throw on allowed Failures', () async {
when(mockProcessManager.run(<String>['kaboom'])).thenAnswer((_) {
return Future<ProcessResult>.value(ProcessResult(0, 1, '', ''));
});
@@ -169,13 +169,13 @@
(await processUtils.run(
<String>['kaboom'],
throwOnError: true,
- whiteListFailures: (int c) => c == 1,
+ allowedFailures: (int c) => c == 1,
)).exitCode,
1,
);
});
- testWithoutContext(' throws on failure when not in whitelist', () async {
+ testWithoutContext(' throws on disallowed failure', () async {
when(mockProcessManager.run(<String>['kaboom'])).thenAnswer((_) {
return Future<ProcessResult>.value(ProcessResult(0, 2, '', ''));
});
@@ -183,7 +183,7 @@
() => processUtils.run(
<String>['kaboom'],
throwOnError: true,
- whiteListFailures: (int c) => c == 1,
+ allowedFailures: (int c) => c == 1,
),
throwsA(isA<ProcessException>()),
);
@@ -295,7 +295,7 @@
throwsA(isA<ProcessException>()));
});
- testWithoutContext(' does not throw on failure with whitelist', () async {
+ testWithoutContext(' does not throw on allowed Failures', () async {
when(mockProcessManager.runSync(<String>['kaboom'])).thenReturn(
ProcessResult(0, 1, '', '')
);
@@ -303,12 +303,12 @@
processUtils.runSync(
<String>['kaboom'],
throwOnError: true,
- whiteListFailures: (int c) => c == 1,
+ allowedFailures: (int c) => c == 1,
).exitCode,
1);
});
- testWithoutContext(' throws on failure when not in whitelist', () async {
+ testWithoutContext(' throws on disallowed failure', () async {
when(mockProcessManager.runSync(<String>['kaboom'])).thenReturn(
ProcessResult(0, 2, '', '')
);
@@ -316,7 +316,7 @@
() => processUtils.runSync(
<String>['kaboom'],
throwOnError: true,
- whiteListFailures: (int c) => c == 1,
+ allowedFailures: (int c) => c == 1,
),
throwsA(isA<ProcessException>()));
});
diff --git a/packages/flutter_tools/test/general.shard/forbidden_imports_test.dart b/packages/flutter_tools/test/general.shard/forbidden_imports_test.dart
index 61ef742..ef93f74 100644
--- a/packages/flutter_tools/test/general.shard/forbidden_imports_test.dart
+++ b/packages/flutter_tools/test/general.shard/forbidden_imports_test.dart
@@ -59,18 +59,18 @@
});
test('no unauthorized imports of dart:io', () {
- final List<String> whitelistedPaths = <String>[
+ final List<String> allowedPaths = <String>[
globals.fs.path.join(flutterTools, 'lib', 'src', 'base', 'io.dart'),
globals.fs.path.join(flutterTools, 'lib', 'src', 'base', 'platform.dart'),
globals.fs.path.join(flutterTools, 'lib', 'src', 'base', 'error_handling_file_system.dart'),
];
- bool _isNotWhitelisted(FileSystemEntity entity) => whitelistedPaths.every((String path) => path != entity.path);
+ bool _isNotAllowed(FileSystemEntity entity) => allowedPaths.every((String path) => path != entity.path);
for (final String dirName in <String>['lib', 'bin']) {
final Iterable<File> files = globals.fs.directory(globals.fs.path.join(flutterTools, dirName))
.listSync(recursive: true)
.where(_isDartFile)
- .where(_isNotWhitelisted)
+ .where(_isNotAllowed)
.map(_asFile);
for (final File file in files) {
for (final String line in file.readAsLinesSync()) {
@@ -85,19 +85,19 @@
});
test('no unauthorized imports of test_api', () {
- final List<String> whitelistedPaths = <String>[
+ final List<String> allowedPaths = <String>[
globals.fs.path.join(flutterTools, 'lib', 'src', 'build_runner', 'build_script.dart'),
globals.fs.path.join(flutterTools, 'lib', 'src', 'test', 'flutter_platform.dart'),
globals.fs.path.join(flutterTools, 'lib', 'src', 'test', 'flutter_web_platform.dart'),
globals.fs.path.join(flutterTools, 'lib', 'src', 'test', 'test_wrapper.dart'),
];
- bool _isNotWhitelisted(FileSystemEntity entity) => whitelistedPaths.every((String path) => path != entity.path);
+ bool _isNotAllowed(FileSystemEntity entity) => allowedPaths.every((String path) => path != entity.path);
for (final String dirName in <String>['lib']) {
final Iterable<File> files = globals.fs.directory(globals.fs.path.join(flutterTools, dirName))
.listSync(recursive: true)
.where(_isDartFile)
- .where(_isNotWhitelisted)
+ .where(_isNotAllowed)
.map(_asFile);
for (final File file in files) {
for (final String line in file.readAsLinesSync()) {
@@ -112,7 +112,7 @@
});
test('no unauthorized imports of package:path', () {
- final List<String> whitelistedPath = <String>[
+ final List<String> allowedPath = <String>[
globals.fs.path.join(flutterTools, 'lib', 'src', 'build_runner', 'web_compilation_delegate.dart'),
globals.fs.path.join(flutterTools, 'test', 'general.shard', 'platform_plugins_test.dart'),
];
@@ -120,7 +120,7 @@
final Iterable<File> files = globals.fs.directory(globals.fs.path.join(flutterTools, dirName))
.listSync(recursive: true)
.where(_isDartFile)
- .where((FileSystemEntity entity) => !whitelistedPath.contains(entity.path))
+ .where((FileSystemEntity entity) => !allowedPath.contains(entity.path))
.map(_asFile);
for (final File file in files) {
for (final String line in file.readAsLinesSync()) {
@@ -135,14 +135,14 @@
});
test('no unauthorized imports of package:file/local.dart', () {
- final List<String> whitelistedPath = <String>[
+ final List<String> allowedPath = <String>[
globals.fs.path.join(flutterTools, 'lib', 'src', 'base', 'file_system.dart'),
];
for (final String dirName in <String>['lib', 'bin', 'test']) {
final Iterable<File> files = globals.fs.directory(globals.fs.path.join(flutterTools, dirName))
.listSync(recursive: true)
.where(_isDartFile)
- .where((FileSystemEntity entity) => !whitelistedPath.contains(entity.path))
+ .where((FileSystemEntity entity) => !allowedPath.contains(entity.path))
.map(_asFile);
for (final File file in files) {
for (final String line in file.readAsLinesSync()) {
@@ -156,17 +156,17 @@
});
test('no unauthorized imports of dart:convert', () {
- final List<String> whitelistedPaths = <String>[
+ final List<String> allowedPaths = <String>[
globals.fs.path.join(flutterTools, 'lib', 'src', 'convert.dart'),
globals.fs.path.join(flutterTools, 'lib', 'src', 'base', 'error_handling_file_system.dart'),
];
- bool _isNotWhitelisted(FileSystemEntity entity) => whitelistedPaths.every((String path) => path != entity.path);
+ bool _isNotAllowed(FileSystemEntity entity) => allowedPaths.every((String path) => path != entity.path);
for (final String dirName in <String>['lib']) {
final Iterable<File> files = globals.fs.directory(globals.fs.path.join(flutterTools, dirName))
.listSync(recursive: true)
.where(_isDartFile)
- .where(_isNotWhitelisted)
+ .where(_isNotAllowed)
.map(_asFile);
for (final File file in files) {
for (final String line in file.readAsLinesSync()) {
@@ -181,20 +181,20 @@
});
test('no unauthorized imports of build_runner or dwds', () {
- final List<String> whitelistedPaths = <String>[
+ final List<String> allowedPaths = <String>[
globals.fs.path.join(flutterTools, 'test', 'src', 'build_runner'),
globals.fs.path.join(flutterTools, 'lib', 'src', 'build_runner'),
globals.fs.path.join(flutterTools, 'lib', 'executable.dart'),
globals.fs.path.join(flutterTools, 'lib', 'devfs_web.dart'),
globals.fs.path.join(flutterTools, 'lib', 'resident_web_runner.dart'),
];
- bool _isNotWhitelisted(FileSystemEntity entity) => whitelistedPaths.every((String path) => !entity.path.contains(path));
+ bool _isNotAllowed(FileSystemEntity entity) => allowedPaths.every((String path) => !entity.path.contains(path));
for (final String dirName in <String>['lib']) {
final Iterable<File> files = globals.fs.directory(globals.fs.path.join(flutterTools, dirName))
.listSync(recursive: true)
.where(_isDartFile)
- .where(_isNotWhitelisted)
+ .where(_isNotAllowed)
.map(_asFile);
for (final File file in files) {
for (final String line in file.readAsLinesSync()) {