linter icon indicating copy to clipboard operation
linter copied to clipboard

Linter for Dart.

Results 394 linter issues
Sort by recently updated
recently updated
newest added

In an effort to simplify the language we may consider removing the implicit `call` tearoff which can coerce an instance of any class which defines a `call` method into a...

In https://github.com/dart-lang/linter/pull/3592 I overlooked an obvious mistake in my implementation. I was confused because the AST that I saw in the test failure did not show the nodes I thought...

type-bug
type-test
type-code-health
P3

**Describe the issue** when instanciating a class with a `const` constructor, the `prefer_const_constructors` warning incorrectly occurs even when the instance is being mutated. **To Reproduce** ```dart class Foo { const...

type-bug
P3
false positive
set-flutter

This PR implements the lint `avoid_unstable_final_fields`, cf. issue #3440. The basic idea is that a final field declaration is taken to indicate that the given property is immutable, and hence...

**Describe the issue** I see lint rules like https://dart-lang.github.io/linter/lints/discarded_futures.html with "Maturity: stable", but are not present in the stable release. (I spent like 2 hours trying to figure out why...

The visitor for `use_late_for_private_fields_and_variables` defines two static fields. They are used to keep track of information across visitors when a library has multiple compilation units (that is, has parts). While...

type-bug
type-performance
P2

**Describe the rule you'd like to see implemented** The idea of this rule is to basically act as if every single parameter has the `required` keyword. The idea is that...

lint request
P3

I wish there was a lint for things frequently used that can blow up. Example: ```dart [].firstWhere(...) // This can throw an exception when false. Use firstWhereOrNull. [].reduce(...) // This...

lint request

Dart SDK version: 2.15.1 (stable) (Tue Dec 14 13:32:21 2021 +0100) on "linux_x64" Observe the following class. The nullable subscription gives warning 'Cancel instances of StreamSubscription', where as the non...

type-bug
false positive
P2

**Describe the issue** Linter allows comparing different enums, despite `unrelated_type_equality_checks` enabled **To Reproduce** ```dart enum FilterGroupBy { date, competitions } enum FilterMatchSelection { allMatches, onlyFavorites } FilterGroupBy groupBy = FilterGroupBy.date;...

type-bug
false negative