dart-sdk/pkg/analyzer_plugin/tool/spec/check_all_test.dart
Paul Berry 7d3bc4862d Rename pkg/analysis_tool to pkg/analyzer_utilities.
It's no longer just for the tools in the `tool` directory; it also
contains test utilities for use by the analyzer and related packages.

Change-Id: I0f8cf57f24ea7aad8e2177e43ee2bcb2ab3030da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171704
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-13 17:46:30 +00:00

21 lines
822 B
Dart

// Copyright (c) 2017, 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';
import 'package:analyzer_utilities/tools.dart';
import 'package:path/path.dart';
import 'generate_all.dart';
/// Check that all targets have been code generated. If they haven't tell the
/// user to run generate_all.dart.
Future<void> main() async {
var script = Platform.script.toFilePath(windows: Platform.isWindows);
var components = split(script);
var index = components.indexOf('analyzer_plugin');
var pkgPath = joinAll(components.sublist(0, index + 1));
await GeneratedContent.checkAll(
pkgPath, join(pkgPath, 'tool', 'spec', 'generate_all.dart'), allTargets);
}