Fix analysis errors in tool/grind.dart. (#92)

Also test its analysis.
This commit is contained in:
Natalie Weizenbaum 2017-01-08 14:31:26 -08:00 committed by GitHub
parent 2073035b6d
commit 6ad037e2e2
2 changed files with 3 additions and 4 deletions

View File

@ -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;

View File

@ -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<String> args) => grind(args);
@DefaultTask('Run the Dart formatter.')
format() {