-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
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
.
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)