Phil Quitslund
Phil Quitslund
**New lint:** Do not store BuildContext into variables, or use across async calls. This lint will flag source where - a `BuildContext` is ever assigned to anything other than a...
`prefer_const_constructors` is wrongly recommending `const` in cases where a deferred element cannot be used in a constant expression. For example: a.dart: ```dart class A { const A(); } const aa...
Test case: ```dart @immutable class A { const A(a); } void constructorTearOffs() { var makeA = A.new; var l1 = makeA([]); // LINT var l2 = makeA(const[]); // OK }...
Note the last test cases: ```dart const int zero = 0; bool le5 = [].length < zero; //
Context: https://github.com/dart-lang/linter/pull/2531#discussion_r597293149
This check is too limited. ```dart final uri = Uri.parse(node.uriContent); if (uri.scheme.isEmpty) { return uri.path.contains('/lib/'); } ``` and only flags cases like `import '../lib/baz.dart'` and misses cases where 'lib' is...
(WIP)
See: #3131 /cc @bwilkerson
See #3131 /cc @bwilkerson
A meta-issue to discuss and track server work on quick assists and fixes for [records](https://github.com/dart-lang/language/blob/master/working/0546-patterns/records-feature-specification.md). **CorrectionProducers to Review/Test/Update** - [ ] `MakeVariableNullable` - [ ] `RemoveConst` - [ ] `RemoveUnnecessaryParentheses`...