Remove usage of --enable-experiment to analysis server (#69614)

This commit is contained in:
Jonah Williams 2020-11-03 08:02:19 -08:00 committed by GitHub
parent c4bd14cc79
commit 9ec5d7131b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 29 deletions

View File

@ -0,0 +1 @@
include: ../analysis_options.yaml

View File

@ -13,7 +13,7 @@ import 'package:path/path.dart' as path;
// See README.md for more information.
final Directory flutterRoot =
Directory(path.fromUri(Platform.script)).absolute.parent.parent.parent.parent.parent;
Directory(path.fromUri(Platform.script)).absolute.parent.parent.parent.parent.parent;
final Directory flutterPackageDir = Directory(path.join(flutterRoot.path, 'packages', 'flutter'));
final Directory testPrivateDir = Directory(path.join(flutterPackageDir.path, 'test_private'));
final Directory privateTestsDir = Directory(path.join(testPrivateDir.path, 'test'));
@ -207,7 +207,7 @@ class TestCase {
printOutputDefault: true,
);
final ProcessRunnerResult result = await runner.runProcess(
<String>[flutter, 'analyze', '--current-package', '--enable-experiment=non-nullable', '--pub', '--congratulate', '.'],
<String>[flutter, 'analyze', '--current-package', '--pub', '--congratulate', '.'],
failOk: true,
);
if (result.exitCode != 0) {

View File

@ -349,33 +349,6 @@ StringBuffer bar = StringBuffer('baz');
}
});
testUsingContext('analyze once supports analyzing null-safe code', () async {
const String contents = '''
int? bar;
''';
final Directory tempDir = fileSystem.systemTempDirectory.createTempSync('flutter_analyze_once_test_null_safety.');
_createDotPackages(tempDir.path, true);
tempDir.childFile('main.dart').writeAsStringSync(contents);
try {
await runCommand(
command: AnalyzeCommand(
workingDirectory: fileSystem.directory(tempDir),
platform: _kNoColorTerminalPlatform,
fileSystem: fileSystem,
logger: logger,
processManager: processManager,
terminal: terminal,
artifacts: artifacts,
),
arguments: <String>['analyze', '--no-pub', '--enable-experiment=non-nullable'],
statusTextContains: <String>['No issues found!'],
);
} finally {
tryToDelete(tempDir);
}
});
testUsingContext('analyze once returns no issues for todo comments', () async {
const String contents = '''
// TODO(foobar):