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

close_sinks rule false positive ? #35221

Closed
jaumard opened this issue Nov 20, 2018 · 2 comments
Closed

close_sinks rule false positive ? #35221

jaumard opened this issue Nov 20, 2018 · 2 comments
Labels
analyzer-linter Issues with the analyzer's support for the linter package 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

Comments

@jaumard
Copy link

jaumard commented Nov 20, 2018

With the following code:

TransactionReceiptBloc() {
    final loadTransactionController = StreamController<int>(sync: true);
    transactionId = loadTransactionController.sink;
  }

  void close() {
    transactionId.close();
  }

dart analyzer still warn about sink not closed, but it is. Or do I miss something ?

ENV:
Dart VM version: 2.1.0-dev.9.4.flutter-f9ebf21297 (Thu Nov 8 23:00:07 2018 +0100) on "macos_x64"

@jaumard jaumard changed the title close_sinks false positive ? close_sinks rule false positive ? Nov 20, 2018
@vsmenon vsmenon added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-linter Issues with the analyzer's support for the linter package labels Nov 29, 2018
@stereotype441 stereotype441 added the P2 A bug or feature request we're likely to work on label Nov 29, 2018
@lukepighetti
Copy link

It looks like your close function is outside of your Bloc class. Can you confirm?

@pq
Copy link
Member

pq commented Jan 21, 2019

This issue was moved to #57882

@pq pq closed this as completed Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-linter Issues with the analyzer's support for the linter package 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
Projects
None yet
Development

No branches or pull requests

5 participants