Skip to content

consider adding support for file analysis to dart analyze #43891

@pq

Description

@pq

Currently dart analyze only works on a directory which surprised me.

[~/src/repos/dart/sdk/pkg/_fe_analyzer_shared] (master) $ dart analyze lib/src/parser/identifier_context_impl.dart 
Directory doesn't exist: lib/src/parser/identifier_context_impl.dart

Usage: dart analyze [arguments] [<directory>]
-h, --help                   Print this usage information.
    --fatal-infos            Treat info level issues as fatal.
    --[no-]fatal-warnings    Treat warning level issues as fatal.
                             (defaults to on)

Run "dart help" to see global options.

I would expect this to work.

(Note that in dartanalyzer it does.)

Metadata

Metadata

Assignees

Labels

area-dart-cliUse area-dart-cli for issues related to the 'dart' command like tool.dart-cli-analyzeIssues related to the 'dart analyze' tooldevexp-ux

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions