Commit Graph

41 Commits

Author SHA1 Message Date
Brian Wilkerson 724ac40b8d Improve error messages and add many corrections
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2426583003 .
2016-10-17 10:40:43 -07:00
Konstantin Shcheglov 5455fd0118 Remove 'initializeTestEnvironment' from 'analyzer'.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2399913002 .
2016-10-06 10:18:54 -07:00
Konstantin Shcheglov 175dad4f15 Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2391423003 .
2016-10-06 08:46:35 -07:00
Brian Wilkerson 154bd389db Fix some failures on the windows bots
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2392793003 .
2016-10-04 08:21:28 -07:00
Konstantin Shcheglov 0223b08a34 Issue 27300. Report HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE. (Land again)
The pkg/analysis_server/test/integration/analysis/error_test was fixed.

R=brianwilkerson@google.com, paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/27300

Review URL: https://codereview.chromium.org/2366963002 .
2016-09-23 10:21:21 -07:00
Paul Berry fe2c152ee2 Revert "Issue 27300. Report HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE."
This broke the analyzer bots.  See for example https://build.chromium.org/p/client.dart/builders/analyzer-mac10.11-release-be/builds/337/steps/analysis%20server%20unit%20tests/logs/stdio

This reverts commit 77ba5fd087.

TBR=scheglov@google.com

Review URL: https://codereview.chromium.org/2361393002 .
2016-09-23 05:24:53 -07:00
Konstantin Shcheglov 77ba5fd087 Issue 27300. Report HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE.
There are no positives in analyzer/server, dev_compiler or dart2js.

R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27300

Review URL: https://codereview.chromium.org/2364733002 .
2016-09-22 14:27:47 -07:00
Brian Wilkerson 6062d5d6bd Fix mustCallSuper to ignore methods from interfaces
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2348383006 .
2016-09-21 08:03:09 -07:00
Brian Wilkerson ecc84b26a4 Break up another large file
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2342733002 .
2016-09-15 07:49:27 -07:00
Konstantin Shcheglov 114fcdb839 Issue 26874. Don't report CAN_BE_NULL_AFTER_NULL_AWARE for members of the Null class.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26874

Review URL: https://codereview.chromium.org/2320573003 .
2016-09-07 09:01:44 -07:00
Konstantin Shcheglov cc6beaf56d Pull in test_reflective_loader 0.0.4 and switch analyzer to it.
There are following changes:

1. DEPS to pull in test_reflective_loader 0.0.4
2. Rename runReflectiveTests() to defineReflectiveTests().
3. Remove analyzer's pkg/analyzer/test/reflective_tests.dart
4. Replace reflective_tests.dart imports with package:test_reflective_loader/test_reflective_loader.dart imports.
5. Sort/format and organize imports in the files with imports changes.
6. Fix for a couple of bugs in analysis_server exposed by the new loader.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2298913003 .
2016-08-31 13:46:39 -07:00
Brian Wilkerson 07850a6562 Remove false positive from override hint
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2228233003 .
2016-08-10 06:12:41 -07:00
Brian Wilkerson 51bda5ac48 Check for missing elements (issue 26987)
R=pquitslund@google.com

Review URL: https://codereview.chromium.org/2196483004 .
2016-07-29 13:19:55 -07:00
Konstantin Shcheglov cc290c1dc0 Fix for false positive in field (not-)overriding.
Fields can also override setters.

R=pquitslund@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2174423005 .
2016-07-25 22:49:01 -07:00
Konstantin Shcheglov 7808f167ec Issue 26787. Report HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER for non-overriding fields.
R=pquitslund@google.com, brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26787

Review URL: https://codereview.chromium.org/2182773002 .
2016-07-25 15:02:27 -07:00
pq 38c132d604 Allow for library access to @protected protected members (linter#254).
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2100493002 .

Fixes: https://github.com/dart-lang/linter/issues/254
2016-06-24 15:05:33 -07:00
pq f4c2a0faba Analyzer support for @factory methods (linter#253).
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2096103002 .

Fixes: https://github.com/dart-lang/linter/issues/253.
2016-06-24 14:41:00 -07:00
pq c113d65ad4 Don't flag improper @protected access in docs (#26713).
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2078493002 .

Fixes: https://github.com/dart-lang/sdk/issues/26713
2016-06-16 09:43:05 -07:00
Sam Rawlins 6e58ff0575 Do not error on dead, mandated statements at end of switch cases
BUG=https://github.com/dart-lang/sdk/issues/26673
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org/2064203002 .
2016-06-15 09:24:32 -07:00
pq 435e38ab77 @required support for super and redirecting cons (#26642).
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2045353002 .

Fixes: https://github.com/dart-lang/sdk/issues/26642
2016-06-08 11:19:43 -07:00
pq 8b1440fd2b Fix @protected checks to play nice with generic supers (linter#257).
Fixes: https://github.com/dart-lang/linter/issues/257.

(Pardon the member-sorting churn in `hint_code_test`.)

BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2045693002 .
2016-06-06 13:14:13 -07:00
pq 8b779f33c0 Fix @protected to include closure references (linter#255).
Generalizes the check for invalid protected access.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2041873003 .

Fixes: https://github.com/dart-lang/linter/issues/255.
2016-06-06 11:43:30 -07:00
pq 5a6c934a0a Fix @protected access check from within defining class (#26614).
Fixes: https://github.com/dart-lang/sdk/issues/26614.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2032363003 .
2016-06-03 09:09:46 -07:00
pq bfd06cbd77 Extend @protected to include implemented interfaces.
Fixes: https://github.com/dart-lang/linter/issues/252.
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2031053002 .
2016-06-02 16:13:03 -07:00
Sam Rawlins 38e8d9702b Revert "Revert "If an if or do statement always exits, following statements are dead.""
This reverts commit c0b0c7be81.

BUG=https://github.com/dart-lang/sdk/issues/16420
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2007933002 .
2016-06-02 15:25:08 -07:00
Konstantin Shcheglov f1bc40923a Report HintCode.UNUSED_FIELD for fields which are referenced in constructor field initializers.
This adds two not false positives in dart2js, and zero to DDC.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2029193003 .
2016-06-02 08:00:22 -07:00
Sam Rawlins c0b0c7be81 Revert "If an if or do statement always exits, following statements are dead."
This reverts commit d7833e1c1f.

BUG=

Review URL: https://codereview.chromium.org/2004223002 .
2016-05-23 15:15:05 -07:00
Sam Rawlins d7833e1c1f If an if or do statement always exits, following statements are dead.
BUG=https://github.com/dart-lang/sdk/issues/16420
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1943443002 .
2016-05-23 13:20:48 -07:00
pq e1fad5cddb Verify that required param constants are accessible outside the declaring lib (#26440).
A test to verify that `required` "details" are accessible in reporting errors found outside of the declaring library.

Follows up on Brian's fix: https://github.com/dart-lang/sdk/commit/23b02bc35112ebb955e006b87b3fbe03c5e071d7.

More context: https://github.com/dart-lang/sdk/issues/26440.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1975383002 .
2016-05-13 14:31:40 -07:00
Sam Rawlins 68cadb3e71 Warn about @deprecated positional parameters
BUG=https://github.com/dart-lang/sdk/issues/22975
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1936873002 .
2016-05-02 10:34:35 -07:00
Sam Rawlins 2cfa9c4665 @deprecated should work on 'called' objects
BUG=https://github.com/dart-lang/sdk/issues/9470

Example output:

$ cat -n a.dart
     1  class Foo {
     2    Foo foo;
     3
     4    @deprecated
     5    call(String name) {
     6      print("hello $name");
     7    }
     8  }
     9
    10  void main() {
    11    Foo f = new Foo();
    12    f("Thomas");
    13    f.foo = new Foo();
    14    f.foo("Timmy");
    15  }
$ xcodebuild/ReleaseX64/dart-sdk/bin/dartanalyzer a.dart
Analyzing [a.dart]...
[hint] 'Foo.call' is deprecated (/Users/srawlins/code/dart-repo3/sdk/a.dart, line 12, col 3)
[hint] 'Foo.call' is deprecated (/Users/srawlins/code/dart-repo3/sdk/a.dart, line 14, col 3)
2 hints found.

R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1922563003 .
2016-04-27 13:40:02 -07:00
Sam Rawlins 7cb775f149 provide MISSING_RETURN on factory constructors
BUG=https://github.com/dart-lang/sdk/issues/17121
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1923593002 .
2016-04-27 12:33:03 -07:00
Sam Rawlins 53bf36acdb Add UNDEFINED_HIDDEN_NAME, UNDEFINED_SHOWN_NAME
BUG=https://github.com/dart-lang/sdk/issues/20363

Also https://github.com/dart-lang/sdk/issues/25154, https://github.com/dart-lang/sdk/issues/25672

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1901923002 .
2016-04-20 15:51:50 -07:00
pq 433fd4558d Required params message fix.
Gets rid of the rogue space when no details are provided in the `@Required` constructor.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1897293003 .
2016-04-19 11:21:09 -07:00
pq ac48484a07 Support for @JS() validation (#26225).
See: https://github.com/dart-lang/sdk/issues/26225

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1871103002 .
2016-04-08 13:45:46 -07:00
Sam Rawlins c1963b3995 Add an UNUSED_SHOWN_NAMES hint to the analyzer
BUG=https://github.com/dart-lang/sdk/issues/21030
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1863103002 .
2016-04-08 11:44:36 -07:00
pq 6a430d0730 Validation of @required params (#26182).
See: https://github.com/dart-lang/sdk/issues/26182.

BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1863803002 .
2016-04-06 06:09:44 -07:00
Konstantin Shcheglov 498c77ef51 Issue dartdoc#1124. Get used elements from directive comments.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/dartdoc/issues/1124

Review URL: https://codereview.chromium.org/1850813002 .
2016-03-31 12:42:51 -07:00
Brian Wilkerson 513433d514 Sort analyzer sources
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1843473002 .
2016-03-28 17:41:52 -07:00
Brian Wilkerson 004f45eba7 Warn about deprecated fields (issue 22963)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1797583003 .
2016-03-13 16:51:00 -07:00
Bob Nystrom 8defa5f77c Split resolver_test.dart into smaller files.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1782463002 .
2016-03-09 10:42:09 -08:00