dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.24k stars 1.57k forks source link

`dart analyze` should not spawn analyzer_plugins #56667

Open rrousselGit opened 2 months ago

rrousselGit commented 2 months ago

For a long time, analyzer_plugins never quite worked with dart analyze / flutter analyze (cf https://github.com/flutter/flutter/issues/28327).
Yet those command still somehow try to spawn analyzer_plugins regardless

Most analyzer_plugins already offer a custom CLI to manually trigger a dart analyze equivalent for their plugins. So since analyzer_plugins don't work with dart analyze yet, it's probably more logical to not run them at all, and suggest analyzer_plugin authors to make a custom CLI for it.

dart-github-bot commented 2 months ago

Summary: The dart analyze command currently attempts to spawn analyzer plugins, even though they don't function correctly with it. This behavior is unnecessary and confusing, as plugins already provide their own CLIs for analysis. It's suggested to remove plugin spawning from dart analyze to avoid misleading users.

pq commented 2 months ago

@srawlins