Files
sdk/pkg/analyzer/tool/experiments/experiments_test.dart
T
Konstantin Shcheglov 6d5543e01b [analyzer] Update generated experiments
experimental_features.yaml was updated in
https://dart-review.googlesource.com/c/sdk/+/219789
but unfortunately the analyzer code wasn't regenerated.

This CL updates the generated files and adds capability of checking
consistency to the generator. A check of consistency is add next to
the check for consistency used in presubmit for the CFE counterpart.

Was: https://dart-review.googlesource.com/c/sdk/+/224520
Change-Id: I59be4335ee81743aca5dc48eaa0df278d64d3692
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229020
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-20 00:07:36 +00:00

22 lines
829 B
Dart

// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import "dart:io" show Platform;
import 'package:analyzer_utilities/tools.dart';
import 'package:path/path.dart';
import 'generate.dart';
/// Check that all targets have been code generated. If they haven't tell the
/// user to run `generate.dart`.
main() async {
String script = Platform.script.toFilePath(windows: Platform.isWindows);
List<String> components = split(script);
int index = components.indexOf('analyzer');
String pkgPath = joinAll(components.sublist(0, index + 1));
await GeneratedContent.checkAll(pkgPath,
join(pkgPath, 'tool', 'experiments', 'generate.dart'), allTargets);
}