Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1483)

Unified Diff: mojo/public/dart/mojom/lib/src/commands/check.dart

Issue 1441033002: Move mojo and mojom from mojo/public/dart to mojo/dart/packages (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/dart/mojom/lib/src/commands/check.dart
diff --git a/mojo/public/dart/mojom/lib/src/commands/check.dart b/mojo/public/dart/mojom/lib/src/commands/check.dart
deleted file mode 100644
index fdf1695b1c44fc0abe3f4ccbd8259b651e5d011a..0000000000000000000000000000000000000000
--- a/mojo/public/dart/mojom/lib/src/commands/check.dart
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-library mojom.command.check;
-
-import 'dart:async';
-import 'dart:io';
-
-import 'package:args/args.dart';
-import 'package:args/command_runner.dart';
-import 'package:mojom/src/commands/mojom_command.dart';
-import 'package:mojom/src/generate.dart';
-import 'package:mojom/src/utils.dart';
-import 'package:path/path.dart' as path;
-
-class CheckCommand extends MojomCommand {
- String get name => 'check';
- String get description => "Check bindings generated by the 'gen' command "
- "against a canonical source";
- String get invocation =>
- 'mojom.dart check -c path/to/canon -r mojoms/ -o dart-packages/';
-
- Directory _canon;
- Directory _dartRoot;
-
- CheckCommand() {
- argParser.addOption('canon',
- abbr: 'c',
- help: 'Directory containing canonical .mojom.dart bindings.');
- argParser.addOption('output',
- abbr: 'o',
- defaultsTo: Directory.current.path,
- help: 'Directory containing Dart packages.');
- }
-
- run() async {
- MojomCommand.setupLogging();
- await _validateArguments();
- var treeChecker =
- new TreeChecker(mojoSdk, mojomRoot, _dartRoot, _canon, skips);
- await treeChecker.check();
- return treeChecker.errors;
- }
-
- _validateArguments() async {
- await validateArguments();
-
- if (argResults['canon'] == null) {
- throw new CommandLineError("The 'tree-check' command requires a --canon"
- " argument.");
- }
- _canon = new Directory(makeAbsolute(argResults['canon']));
- if (!await _canon.exists()) {
- throw new CommandLineError("The specified canonical output directory: "
- "$_canon does not exist.");
- }
- _dartRoot = new Directory(makeAbsolute(argResults['output']));
- if (!await _dartRoot.exists()) {
- throw new CommandLineError(
- 'Specified --output directory $_dartRoot does not exist');
- }
- }
-}
« no previous file with comments | « mojo/public/dart/mojom/lib/src/command_runner.dart ('k') | mojo/public/dart/mojom/lib/src/commands/gen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698