Commit 8ab229f8 authored by Hixie's avatar Hixie

Make the analyzer actually work.

Turns out that ignoring all error lines that match the empty string is a
poor way to go.

Also, we have to update all the example packages now too, since we
analyze them. So just have travis use our update script.

Also, remove flutter_tools' old travis stuff. It's now part of a bigger
repo.

Also, make travis use the dev Dart SDK, since we need the new analyzer.
Stable is way too out of date, e.g. it still complains about libraries
not having names and mixins using 'super', and the strong mode hints are
even more aggressive than on dev.
parent 5109dd51
language: dart language: dart
sudo: false sudo: false
dart: dart:
- stable - dev
addons: addons:
apt: apt:
sources: sources:
......
...@@ -140,9 +140,8 @@ class AnalyzeCommand extends FlutterCommand { ...@@ -140,9 +140,8 @@ class AnalyzeCommand extends FlutterCommand {
// prepare a Dart file that references all the above Dart files // prepare a Dart file that references all the above Dart files
StringBuffer mainBody = new StringBuffer(); StringBuffer mainBody = new StringBuffer();
for (int index = 0; index < dartFiles.length; index += 1) { for (int index = 0; index < dartFiles.length; index += 1)
mainBody.writeln('import \'${path.normalize(path.absolute(dartFiles[index]))}\' as file$index;'); mainBody.writeln('import \'${path.normalize(path.absolute(dartFiles[index]))}\' as file$index;');
}
mainBody.writeln('void main() { }'); mainBody.writeln('void main() { }');
// prepare a union of all the .packages files // prepare a union of all the .packages files
...@@ -243,8 +242,8 @@ class AnalyzeCommand extends FlutterCommand { ...@@ -243,8 +242,8 @@ class AnalyzeCommand extends FlutterCommand {
new RegExp('^\\[error\\] Target of URI does not exist: \'dart:ui_internals\''), // https://github.com/flutter/flutter/issues/83 new RegExp('^\\[error\\] Target of URI does not exist: \'dart:ui_internals\''), // https://github.com/flutter/flutter/issues/83
new RegExp(r'\[lint\] Prefer using lowerCamelCase for constant names.'), // sometimes we have no choice (e.g. when matching other platforms) new RegExp(r'\[lint\] Prefer using lowerCamelCase for constant names.'), // sometimes we have no choice (e.g. when matching other platforms)
new RegExp(r'\[lint\] Avoid defining a one-member abstract class when a simple function will do.'), // too many false-positives; code review should catch real instances new RegExp(r'\[lint\] Avoid defining a one-member abstract class when a simple function will do.'), // too many false-positives; code review should catch real instances
new RegExp(r'\[0-9]+ (error|warning|hint|lint).+found\.'), new RegExp(r'[0-9]+ (error|warning|hint|lint).+found\.'),
'', new RegExp(r'^$'),
]; ];
RegExp generalPattern = new RegExp(r'^\[(error|warning|hint|lint)\] (.+) \(([^(),]+), line ([0-9]+), col ([0-9]+)\)$'); RegExp generalPattern = new RegExp(r'^\[(error|warning|hint|lint)\] (.+) \(([^(),]+), line ([0-9]+), col ([0-9]+)\)$');
......
#!/bin/bash
# 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.
# Fast fail the script on failures.
set -e
# Fetch all our dependencies
pub get
# Verify that the libraries are error free.
pub global activate tuneup
pub global run tuneup check
# And run our tests.
pub run test -j1
...@@ -144,7 +144,7 @@ class WidgetTester { ...@@ -144,7 +144,7 @@ class WidgetTester {
_dispatchEvent(p.up(), result); _dispatchEvent(p.up(), result);
} }
void fling(Element element, Offset offset, velocity, { int pointer: 1 }) { void fling(Element element, Offset offset, double velocity, { int pointer: 1 }) {
flingFrom(getCenter(element), offset, velocity, pointer: pointer); flingFrom(getCenter(element), offset, velocity, pointer: pointer);
} }
......
#!/bin/bash #!/bin/bash
set -ex set -ex
pub global activate tuneup dart dev/update_packages.dart
(cd packages/cassowary; pub get)
(cd packages/flutter_sprites; pub get)
(cd packages/flutter_tools; pub get)
(cd packages/flx; pub get)
(cd packages/newton; pub get)
(cd packages/playfair; pub get)
(cd packages/unit; pub get)
(cd packages/updater; pub get)
./travis/download_tester.py packages/unit/packages/sky_engine/REVISION bin/cache/travis/out/Debug ./travis/download_tester.py packages/unit/packages/sky_engine/REVISION bin/cache/travis/out/Debug
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment