mirror of
https://github.com/flutter/flutter
synced 2024-10-13 11:42:54 +00:00
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.
This commit is contained in:
parent
5109dd51a6
commit
8ab229f89c
|
@ -1,7 +1,7 @@
|
|||
language: dart
|
||||
sudo: false
|
||||
dart:
|
||||
- stable
|
||||
- dev
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
|
|
|
@ -140,9 +140,8 @@ class AnalyzeCommand extends FlutterCommand {
|
|||
|
||||
// prepare a Dart file that references all the above Dart files
|
||||
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('void main() { }');
|
||||
|
||||
// prepare a union of all the .packages files
|
||||
|
@ -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(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'\[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]+)\)$');
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#!/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 {
|
|||
_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);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,6 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
pub global activate tuneup
|
||||
|
||||
(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)
|
||||
dart dev/update_packages.dart
|
||||
|
||||
./travis/download_tester.py packages/unit/packages/sky_engine/REVISION bin/cache/travis/out/Debug
|
||||
|
|
Loading…
Reference in a new issue