Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyzer shows warning on console but not in WebStorm #26248

Closed
zoechi opened this issue Apr 13, 2016 · 4 comments
Closed

Analyzer shows warning on console but not in WebStorm #26248

zoechi opened this issue Apr 13, 2016 · 4 comments
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@zoechi
Copy link
Contributor

zoechi commented Apr 13, 2016

With this project:
https://github.com/bwu-dart/bwu_datagrid/blob/94ce0532d40faaa61a4b7a2bb0c6ba290f4e81e5/lib/bwu_datagrid.dart#L3401-L3401

branch polymer1

run

  • pub build
  • pub global activate grinder
  • grind

image

When run from the console I get

[warning] Unsound implicit cast from Rectangle to Rectangle (/home/zoechi/dart/bwu_datagrid/lib/bwu_datagrid.dart, line 3401, col 36)

but WebStorm doesn't show anything.

In the screenshot the lower part is the console output, the upper part shows the referred line in the editor (no warning)

The other warnings and lints in the console are because of #26212

@kevmoo kevmoo added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Apr 19, 2016
@bwilkerson
Copy link
Member

Unsound implicit cast from Rectangle to Rectangle

Sounds like a strong mode error. It seems likely that what's happening is that the command-line analyzer is running in strong mode and the analysis server isn't. What does the directory structure look like in terms of (a) the directory opened in IntelliJ, (b) the directory from which the command-line analyzer was being run, and (c) the location of any .analysis_options files?

@zoechi
Copy link
Contributor Author

zoechi commented May 3, 2016

Might be the same as #26129

It's a normal pub package

  • bwu_datagrid
    • pubspec.yaml
    • pubspec.lock
    • .packages
    • .analysis_options
    • bin
    • example_
    • lib
    • packages
    • tool
    • test
    • web

What is special is that example_ (note the _ at the end to avoid pub recognizing it) also contains the same structure again but the shown errors are not from the example_ directory, therefore I assumed this doesn't cause the issue (both .analysis_options files have the same content).

@bwilkerson bwilkerson added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Jun 8, 2016
@zoechi
Copy link
Contributor Author

zoechi commented Feb 7, 2018

Occurred again

Travis output

lib/src/client/controller/my_group_controller.dart, lib/src/client/client.dart...
      lint • Conditions should not unconditionally evaluate to "TRUE" or to "FALSE" at lib/src/client/reducer/group.dart:36:5 • literal_only_boolean_expressions
      lint • Conditions should not unconditionally evaluate to "TRUE" or to "FALSE" at lib/src/client/reducer/invitation.dart:49:5 • literal_only_boolean_expressions
      lint • Conditions should not unconditionally evaluate to "TRUE" or to "FALSE" at lib/src/model/serializer_custom_standard_json_plugin.dart:75:7 • literal_only_boolean_expressions
      lint • Conditions should not unconditionally evaluate to "TRUE" or to "FALSE" at lib/src/model/serializer_custom_standard_json_plugin.dart:79:7 • literal_only_boolean_expressions
      lint • Cascade consecutive method invocations on the same reference at test/client/controller/debug_controller_test.dart:32:7 • cascade_invocations
    5 lints found.

reducer/group.dart

if (state.group.selectedGroup == null || isGroupRemoved ?? false) {

reducer/invitation.dart

if (contacts?.isEmpty ?? true) {

model/serializer_custom_standard_json_plugin.dart

if (object.sys.id?.isEmpty ?? true) {
if (object.sys.createdUserId?.isEmpty ?? true) {

controller/debug_controller_test.dart

    test('clearImageCache', () {
      // set up
      expect(serverApi.debug.clearImageCacheCalledCounter, 0);

      // exercise
      appController.debugController.clearImageCache();
      appController.debugController.clearImageCache();

      // verification
      expect(serverApi.debug.clearImageCacheCalledCounter, 2);

      // tear down
    });

Why aren't they shown in IntelliJ?

Dart VM version: 2.0.0-dev.20.0 (Mon Jan 29 16:25:01 2018 +0100) on "macos_x64"

@zoechi
Copy link
Contributor Author

zoechi commented Aug 29, 2018

Haven't seen this in a while.
I'll reopen if I encounter it again.

@zoechi zoechi closed this as completed Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants