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

detekt-core shouldn't depend on detekt-psi-utils #7279

Open
3flex opened this issue May 8, 2024 · 2 comments
Open

detekt-core shouldn't depend on detekt-psi-utils #7279

3flex opened this issue May 8, 2024 · 2 comments

Comments

@3flex
Copy link
Member

3flex commented May 8, 2024

Expected Behavior

:detekt-core shouldn't depend on :detekt-psi-utils.

Observed Behavior

It does.

Context

I believe detekt-psi-utils should only be used to support rule writers. detekt-core shouldn't have an implementation dependency on a module like this, it should be runtimeOnly.

Calls to absolutePath() are simple to replace. The problem classes are AnnotationExcluder and FunctionMatcher which were moved to detekt-psi-utils in #7105 (cc @BraisGabin). I'm not proposing to revert that PR, as these classes don't belong in detekt-tooling either.

@BraisGabin
Copy link
Member

My proposal would be to duplicate the code. On core and cli.

Does this dependency block anything? Or it is just to clean up?

@3flex
Copy link
Member Author

3flex commented May 8, 2024

Clean up. It would be great to get to the point that psi-utils API is really focused and valuable. I'm going to keep chipping away at it.

But going hand in hand with that is removing the dependency where it should not be needed.

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

No branches or pull requests

2 participants