Closed harryterkelsen closed 4 years ago
... when trying to run
pub global run linter .
The exception should be fixed by https://dart-review.googlesource.com/c/sdk/+/133154, but I'll point out that the linter is not intended to be used as a stand-alone tool. It only has a main
for testing purposes. We don't guarantee that we will continue to support using it this way, nor that the results you get will always match what you'd see when running it via dartanalyzer
, as intended.
Using
analyzer 0.39.4
andlinter 0.1.109
I am getting this stacktrace when trying to runpub global run linter .
:It seems like these lines are the culprit: https://github.com/dart-lang/sdk/blob/master/pkg/analyzer/lib/src/lint/project.dart#L147
It might be fixed by casting them, i.e.: