dart-code-checker/dart-code-metrics

[BUG] Multiple analyzer plugins can't be enabled

cbenhagen opened this issue · 4 comments

Environment and configuration

Starting from Flutter 3.7.6 it is not possible to use multiple ananlyzer plugins anymore. So the following config will throw the following:
warning: Multiple plugins can't be enabled

What did you do?

include: package:lint/analysis_options.yaml

analyzer:
  errors:
    ...
  exclude:
    ...
  plugins:
    - dart_code_metrics
    - custom_lint

...

What did you expect to happen?

I expect to be able to use dart_code_metrics together with other analyzer plugins.

What actually happened?

warning: Multiple plugins can't be enabled

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

Please consider integrating with custom_lint.

I expect to be able to use dart_code_metrics together with other analyzer plugins.

Well, this limitation comes from the API that we use and can't be considered as a bug.
We have another version that doesn't use analyzer plugins, consider switching to it.

If that other version would have a reasonable pricing option for single person teams I would definitely consider it. But currently it costs more than the whole Intellij Suite. So unless that changes there is no real alternative and there is a path forward that other analyzer plugins use: They integrate with custom_lint to improve performance and be compatible with that API.

@incendial please consider to re-open as a feature request

Hi, I have faced a similar issue with multiple analyzer plugins. I have came up with the idea of having a proxy analyzer plugin that allows multiple plugins to register. While I support assists for now, it could be extended to support more or it could be used for your own cases. You can see about that here https://github.com/spideythewebhead/analyzer_plugin_proxy_generator