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

False positive WRONG_OVERLOADING_FUNCTION_ARGUMENTS #1594

Closed
nulls opened this issue Dec 29, 2022 · 1 comment · Fixed by #1623
Closed

False positive WRONG_OVERLOADING_FUNCTION_ARGUMENTS #1594

nulls opened this issue Dec 29, 2022 · 1 comment · Fixed by #1623
Assignees
Labels
bug Something isn't working
Milestone

Comments

@nulls
Copy link
Member

nulls commented Dec 29, 2022

Describe the bug

False positive WRONG_OVERLOADING_FUNCTION_ARGUMENTS for overridden methods:

fun list(projectCoordinates: ProjectCoordinates): Flux<FileKey> = list()
    .filter { it.projectCoordinates == projectCoordinates }

override fun list(): Flux<FileKey> = newFileStorage.list()
    .map { fileDto ->
        FileKey(
            projectCoordinates = fileDto.projectCoordinates,
            name = fileDto.name,
            uploadedMillis = fileDto.uploadedTime.toInstant(TimeZone.UTC).toEpochMilliseconds()
        )
    }

Expected behavior

Do not take into account overridden methods for rule WRONG_OVERLOADING_FUNCTION_ARGUMENTS

Observed behavior

Steps to Reproduce

Environment information

  • diktat version: 1.2.4.1
  • build tool (maven/gradle): gradle
  • how is diktat run (CLI, plugin, etc.): plugin
  • kotlin version: 1.7.20
  • operating system: unix,windows
  • link to a project (if your project is public):

Related

@icemachined
Copy link
Member

the issue is not reproduced in diktat version 1.2.4.2, 1.2.4.1 was cut before #1520 was merged

@0x6675636b796f75676974687562 0x6675636b796f75676974687562 added this to the 1.2.5 milestone Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants