Commit Graph

137 Commits

Author SHA1 Message Date
Devon Carew
780e4e6212 move the analysis_options to a file 2016-03-10 13:47:20 -08:00
Hixie
c7339de6bc Enable always_declare_return_types lint
And fix a zillion omissions this uncovered.
2016-03-09 17:57:39 -08:00
Hixie
8950d3ccc4 Make flutter analyze useful for package conflicts
Also, resolve our package conflict, since reflectable has been fixed.
2016-03-09 17:41:05 -08:00
Hixie
5810cd80bd Avoid 'as' keyword
It has performance implications in release mode.

We'll enable the lint once https://github.com/dart-lang/linter/issues/195 is fixed.
2016-03-09 15:00:55 -08:00
Devon Carew
52efc7fb68 implement --watch for flutter analyze 2016-03-07 13:46:42 -08:00
Ian Hickson
047276a666 Random fixes to dartdocs, http lib, analyzer
This is a variety of trivial fixes that I collected while going through the dartdocs.
This does contain some non-comment changes.
2016-03-03 23:56:40 -08:00
Devon Carew
d911aaa6d0 refactot the stop command to not use DeviceStore 2016-03-03 00:22:40 -08:00
Yegor Jbanov
6d35481cfa add smoke driver test; find by tooltip; retry predicate 2016-02-29 16:50:47 -08:00
Hixie
ba918fea26 flutter analyze: handle missing files 2016-02-26 18:59:07 -08:00
Hixie
a9040433ad Handle lines getting shorter during analysis 2016-02-26 15:37:43 -08:00
Hixie
a33e256ab8 Handle conflicting 'library' identifiers
Also, handle the new directory structure of the flutter repo.
2016-02-26 10:58:39 -08:00
pq
fdb2819e1e Ignore errors via analysis options.
Migrates error suppression from regexps to analysis options.
* Ignore TODOs.
* Ignore strong mode field and method overrides (see `InvalidFieldOverride` and `InvalidMethodOverride` in `strong/info.dart`.
* Remove stale regexp to capture refs to dead `dart:ui_internals` URI.
* Remove stale regexp to capture dead strong mode "will need runtime check to cast to type" error (https://github.com/dart-lang/sdk/issues/24542).

5 regexp downs, another small handful (~4) to go! :)
2016-02-25 13:49:05 -08:00
pq
b69d249460 Enumerate lints for analysis in synthesized options file.
This enables us to exclude `library_names` pending a new stable SDK push (see notes: https://github.com/flutter/flutter/pull/1996).  Also excluded are a few lints who's feedback was just getting regexp'ed out.  Moving forward, this will allow us to selectively enable specific lints of interest as well.
2016-02-23 15:07:55 -08:00
Devon Carew
d5a6fceee5 add a summary option to the doctor class 2016-02-17 09:33:45 -08:00
Devon Carew
2dbceafbc6 introduce globals scoped to the app's context 2016-02-09 22:03:13 -08:00
Adam Barth
3c8cbef973 Rationalize RenderViewport and RenderVirtualViewport
These classes now share more code and have feature parity.
2016-02-09 10:30:52 -08:00
Devon Carew
d6b4759fee tweak the output for the analyze command 2016-01-30 22:06:26 -08:00
Devon Carew
d7fbf5302d use status(), error(), and trace() for logging
rename to printTrace(), printStatus(), and printError()
2016-01-28 12:44:17 -08:00
Ian Hickson
5494323db9 Move us to HashSet to avoid the overhead of tracking the order 2016-01-23 18:13:13 -08:00
Ian Hickson
62673cf67b Merge pull request #1286 from Hixie/better-analyze
Make 'flutter analyze' support analyzing arbitrary files
2016-01-17 22:34:13 -08:00
Ian Hickson
1f6ed67bd9 Make 'flutter analyze' support analyzing arbitrary files
Before we didn't know how to find the packages of random files. Now we do.
2016-01-16 13:38:47 -08:00
Ian Hickson
9eb978443b Prepare flutter analyze for dart 1.14 2016-01-16 11:28:13 -08:00
Devon Carew
0f55ebe503 fixes to flutter analyze for the latest dev sdk 2016-01-12 19:04:19 -08:00
Eric Seidel
9257682b01 Remove stray period added from web editor. 2016-01-12 17:09:15 -08:00
Eric Seidel
a6e8fccb90 Correct display error for flutter analyze timing
Fixes #1213.
2016-01-12 17:08:38 -08:00
Eric Seidel
001c107858 Teach analyze how to print out the total time spent
Makes it more obvious that flutter analyze takes a long time.

@Hixie
2016-01-12 09:20:36 -08:00
Ian Hickson
7151fdd054 Move flutter tests from packages/unit to packages/flutter/test 2015-12-16 08:00:57 -08:00
Hixie
0a6b0f9b0b Always import our packages when analyzing. 2015-12-14 12:56:31 -08:00
Hixie
889a1e8eb3 Analyze more tests. 2015-12-14 11:06:42 -08:00
Ian Hickson
0290622bc6 Analyzer improvements
- strengthen analyzer against error messages that point past the
  bottom of the file.

- ignore any errors in intl's auto-generated files.
2015-12-03 19:52:23 -08:00
Adam Barth
9662d49e12 Clean up code organization in flutter_tools
1) Moved basic utility code into base/ directory to make it clear which code
   doesn't depend on Flutter-specific knowldge.
2) Move the CommandRunner subclasses into a runner/ directory because these
   aren't commands themselves.
2015-11-28 21:16:55 -08:00
Ian Hickson
92a6212007 dev/update_packages.dart --upgrade
Add an --upgrade flag to the dev/update_packages.dart flag which runs
'pub upgrade' instead of 'pub get'. Tell people to use this when using
'flutter analyze' since 'pub get' doesn't have the same guarantee of
getting everything in sync.
2015-11-27 20:01:13 -08:00
Adam Barth
4cd1fb177a Fix analyzer warnings in updater package
This class was renamed to MojoEventSubscription.
2015-11-20 13:12:27 -08:00
Hixie
56b9245b1a Allowing us to have a single error seems silly. 2015-11-17 11:08:46 -08:00
Hixie
8ab229f89c 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.
2015-11-12 15:41:04 -08:00
Hixie
4a5713acc8 Delete analyzer temporary directories 2015-11-12 13:11:41 -08:00
Hixie
a0227cab15 flutter analyze command
Other changes in this patch:
- Make the 'flutter' tool say "Updating flutter tool..." when it calls
  pub get, to avoid confusion about what the pub get output is about.
- Make the bash flutter tool call pub get when the revision has
  changed. (This was already happening on Windows.)
- Fix a raft of bugs found by the analyzer.
- Fix some style nits in various bits of code that happened to be near
  things the analyzer noticed.
- Remove the logic in "flutter test" that would run "pub get", since
  upon further reflexion it was determined it didn't work anyway.
  We'll probably have to add better diagnostics here and say to run the
  updater script.
- Remove the native velocity tracker script, since it was testing code
  that has since been removed.

Notes on ignored warnings:
- We ignore warnings in any packages that are not in the Flutter repo or
  in the author's current directory.
- We ignore various irrelevant Strong Mode warnings. We still enable
  strong mode because even though it's not really relevant to our needs,
  it does (more or less accidentally) catch a few things that are
  helpful to us.
- We allow CONSTANTS_LIKE_THIS, since we get some of those from other
  platforms that we are copying for sanity and consistency.
- We allow one-member abstract classes since we have a number of them
  where it's perfectly reasonable.
- We unfortunately still ignore warnings in mojom.dart autogenerated
  files. We should really fix those but that's a separate patch.
- We verify the actual source file when we see the 'Name non-constant
  identifiers using lowerCamelCase.' lint, to allow one-letter variables
  that use capital letters (e.g. for physics expressions) and to allow
  multiple-underscore variable names.
- We ignore all errors on lines that contain the following magic
  incantation and a "#" character:
    // analyzer doesn't like constructor tear-offs
- For all remaining errors, if the line contains a comment of the form
    // analyzer says "..."
  ...then we ignore any errors that have that "..." string in them.
2015-11-12 12:23:29 -08:00