Skip to content

Wrong reference to duplication error #358

Open
@f-moya

Description

Reported by a user and recently confirmed, there are cases where the engine gives a wrong reference to a duplication error. It's not a false positive, but the referenced lines are not the ones that are causing the duplication error.

It indicates the error like following
Screen Shot 2021-02-05 at 11 07 25

but the real duplication it's in the declared functions. If you remove the similarities between the functions the duplication does not pop up any warning.

Files to reproduce the problem.
wrong-duplication-reference.zip

With the following files it possible to see how there is no warning the the functions are not similar. Therefore the reference to the namespace section where the duplication was supposed to be was wrong, but there was a duplication error.
wrong-duplication-reference.zip

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions