Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

[BUG] Multiple analyzer plugins can't be enabled #1213

Closed
1 task
cbenhagen opened this issue Mar 24, 2023 · 4 comments
Closed
1 task

[BUG] Multiple analyzer plugins can't be enabled #1213

cbenhagen opened this issue Mar 24, 2023 · 4 comments
Assignees
Labels
type: bug Something isn't working

Comments

@cbenhagen
Copy link

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.

@cbenhagen cbenhagen added the type: bug Something isn't working label Mar 24, 2023
@cbenhagen
Copy link
Author

cbenhagen commented Mar 24, 2023

Relevant issues:
dart-lang/sdk#50981
flutter/flutter#121836

@incendial
Copy link
Member

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.

@incendial incendial closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2023
@cbenhagen
Copy link
Author

cbenhagen commented Mar 24, 2023

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

@spideythewebhead
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants