dart analyze
cannot analyze file without .dart
extension.
#55591
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
area-dart-cli
Use area-dart-cli for issues related to the 'dart' command like tool.
dart-cli-analyze
Issues related to the 'dart analyze' tool
P3
A lower priority bug or feature request
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
I have a script file with the name
dgr
, and a first line of#! ...path-to-dart-exe
. Pretty standard for a Dart script file.If I try to analyze that as
dart analyze ~/bin/dgr
, the analyzer reports "No issues", even if the file is full of errors.It seems the analyzer tries to avoid non-Dart files by ignoring files not ending in
.dart
, which is reasonable if I'm analyzing entire directories, but when being asked to analyze a single specific file, the analyzer should probably do what is being asked for.I'm not sure whether this affects other
dart
sub-commands.Both
dart run
anddart format
works with no problem.I don't know if it affects
dart fix
, haven't been able to make a mistake thatfix
can fix (probably because the file is not in a context with an analysis options).The text was updated successfully, but these errors were encountered: