Skip to content

[BUG] Warning 'Multiple keywords with the name <name> found.' due to incorrect import handling #340

@bennyvw

Description

@bennyvw

Describe the bug
In VSCode with RobotCode I get an error message about Multiple Keywords with the same name, which is not true:
image
When I Ctrl+click on the keyword, a popup is showing up, which indicates that the keyword resides in a resource under 'Resources' and 'resources', so a difference in casing of the first character:
image (1)

Steps To Reproduce
Steps to reproduce the behavior:
I am working with relative imports, that might cause the issue.
In another file, the same resource was imported too, using Scenarios/03 CPQ.resource. That worked for that file, but was not correct. It should have been ../../Scenarios/03 CPQ.resource. Don't know why it wasn't flagged as an error, since I don't use PYTHONPATH yet.
After I corrected that import, the keyword can be uniquely resolved again :)

Expected behavior
A message about an already imported resource or an indication that the Resource import in the second file could not be found.

Desktop (please complete the following information):

  • VS Code Version 1.94.2
  • RobotCode Version 0.94.0
  • OS: Windows 11
  • Python Version 3.11.8
  • RobotFramework Version 7.0.1
  • Robocop 5.4.0
  • Robotidy 4.14.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions