[New feature: blocked] Run dart_code_metrics
when running dart analyze
command #313
Description
Actually, this is not just a question and closer to feature request. But there is almost nothing should be done in dart_code_metrics
to implement this feature.
A relatively new dart analyze
command (which replaces dartanalyzer
) uses analysis server to perform linting. dart
tool launches analysis server and communicates with it to get code analysis issues. I actually spent some time and investigated this scenario. I see that plugins (and dart_code_metrics
plugin) in such scenario are being loaded and work properly.
But issues found by dart_code_metrics
are not reported in this scenario: analysis server shutted down too early by dart
tool.
There is an issue in Dart SDK repository which blocks us from using the plugin inside dart analyze
workflow:
dart analyze
does not know when analyzer plugin results are complete
I decided to open this issue just to track Dart SDK issue . The issue has P3
status and I hope it will be fixed relatively soon. My proposal is document ability to run dart_code_metrics
using dart analyze
after Dart SDK issue is fixed.
I suppose it would be more convenient to use the plugin with "standard" workflow with dart analyze
, please let me know what do you think about this.