From 6ad037e2e21d224640e92f615057b3d379512162 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Sun, 8 Jan 2017 14:31:26 -0800 Subject: [PATCH] Fix analysis errors in tool/grind.dart. (#92) Also test its analysis. --- .travis.yml | 2 +- tool/grind.dart | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index d7766dc6..dd393f44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,7 @@ install: script: - if [ "$TASK" = analyze ]; then echo "${bold}Analzing Dart code.$none"; - dartanalyzer --fatal-warnings lib/ test/; + dartanalyzer --fatal-warnings lib/ test/ tool/; elif [ "$TASK" = format ]; then echo "${bold}Ensuring Dart code is formatted.$none"; ./tool/assert-formatted.sh; diff --git a/tool/grind.dart b/tool/grind.dart index a293c24f..be0399ef 100644 --- a/tool/grind.dart +++ b/tool/grind.dart @@ -5,7 +5,6 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; -import 'dart:isolate'; import 'package:archive/archive.dart'; import 'package:grinder/grinder.dart'; @@ -16,7 +15,7 @@ import 'package:yaml/yaml.dart'; /// The version of Dart Sass. final String _version = - loadYaml(new File('pubspec.yaml').readAsStringSync())['version']; + loadYaml(new File('pubspec.yaml').readAsStringSync())['version'] as String; /// The version of the current Dart executable. final String _dartVersion = Platform.version.split(" ").first; @@ -24,7 +23,7 @@ final String _dartVersion = Platform.version.split(" ").first; /// The root of the Dart SDK. final _sdkDir = p.dirname(p.dirname(Platform.resolvedExecutable)); -main(args) => grind(args); +main(List args) => grind(args); @DefaultTask('Run the Dart formatter.') format() {