Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All rules marked with @RequiresTypeResolution annotation cannot be recognized #499

Open
ljcmeng opened this issue Nov 26, 2023 · 1 comment
Labels
feature New feature or request

Comments

@ljcmeng
Copy link

ljcmeng commented Nov 26, 2023

Hello, I found that all rules marked with @RequiresTypeResolution cannot be recognized. Such as ForbiddenVoid
The reason is that no CompilerSpec configuration is provided when initializing ProcessingSpec.
There is a classpath configuration item that I don’t know how to fill in. Does anyone know if this is "by design" or "bug"?

@arturbosch
Copy link
Member

The plugin was started before detekt supported type resolution.
One could say, it is "by design" to not slow down the analysis as every change triggers a whole detekt run like using it from the cli.
Idea and detekt both bundle different Kotlin compilers which do not work nice together at runtime.
Therefore, the Intellij plugin only uses detekt's api module and service loaders to start detekt.
Using the embedded Kotlin compiler classes directly will lead to classloader problems.

One could try to determine the classpath via some IntelliJ api and pass it to the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants