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

analysis_options's exclude is not respected with parts #34717

Closed
a14n opened this issue Oct 8, 2018 · 2 comments
Closed

analysis_options's exclude is not respected with parts #34717

a14n opened this issue Oct 8, 2018 · 2 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

@a14n
Copy link
Contributor

a14n commented Oct 8, 2018

Tested with 2.0.0 and 2.1.0-dev.5.0 and the following files:

  • analysis_options.yaml:
analyzer:
  exclude:
  - '**.g.dart'
linter:
  rules:
  - unnecessary_new
  • lib/a.dart:
part 'a.g.dart';
final a = new List();
  • lib/a.g.dart:
part of 'a.dart';
final b = new List();

I get the result:

$ dartanalyzer .
Analyzing test...
  lint • Unnecessary new keyword at lib/a.dart:2:11 • unnecessary_new
  lint • Unnecessary new keyword at lib/a.g.dart:2:11 • unnecessary_new
2 lints found.

Regarding the exclude section lint on a.g.dart shouldn't be there.

As the generated file is not really modifiable this issue is quite annoying when you use package like source_gen.

@a14n
Copy link
Contributor Author

a14n commented Oct 8, 2018

/cc @bwilkerson @scheglov

@mit-mit mit-mit added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Oct 8, 2018
@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 Oct 8, 2018
@devoncarew devoncarew modified the milestone: Dart2.2 Oct 8, 2018
@MichaelRFairhurst
Copy link
Contributor

This is a duplicate of #25551.

I really hope we solve this soon..!

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

5 participants