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

NamedArguments with java code false positive #3289

Closed
BraisGabin opened this issue Dec 15, 2020 · 1 comment · Fixed by #3290
Closed

NamedArguments with java code false positive #3289

BraisGabin opened this issue Dec 15, 2020 · 1 comment · Fixed by #3290

Comments

@BraisGabin
Copy link
Member

Expected Behavior

This code should not raise any NamedArguments issue:

import org.joda.time.DateTime

DateTime(2020, 3, 13, 14, 0, 0)

Observed Behavior

It does

Context

If you use a java function in kotlin you can't use NamedArguments so there is no way to fix this.

Your Environment

  • Version of detekt used: 1.15.0-RC1
@schalkms
Copy link
Member

Yes, that's true.
Currently, I don't think we have a rule that checks the target programming language of a called function.
For realizing this behavior, one needs to dig into the compiler and see, whether there is an API available.
If we are lucky, the BindingContext can be used to fetch this information.

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

Successfully merging a pull request may close this issue.

3 participants