[Enhancement] Intellisense suggests private keywords from other files
Lakitna opened this issue · comments
Describe the bug
When using Intellisense to auto complete a keyword: The list of available keywords includes keywords tagged with robot:private. Keywords tagged like this should not be used outside the file where they are defined. Robot Framework userguide on the topic.
Steps To Reproduce
Steps to reproduce the behavior:
- Make a
.resourcefile - Add 2 keywords to the file
- Tag 1 of the keywords with
robot:private - Make a
.robotfile - Add a test
- Add the private keyword using Intellisense (autocomplete)
If possible add some example source code like:
# foo.resource
*** Keywords ***
Some Public Keyword
No Operation
Some Private Keyword
[Tags] robot:private
No Operation# bar.robot
*** Settings ***
Resource ./foo.resource
*** Test Cases ***
My Amazing Test Case
Some P- Place cursor after
P - Hit
ctrl+space - Note that both keywords from
foo.resourceshow up.
Expected behavior
Private keywords should not be suggested outside the file where they're created.
Screenshots/ Videos
Logs
N/A
Additional context
N/A
Desktop (please complete the following information):
- VS Code Version 1.103.1
- RobotCode Version 1.8.0
- OS: Windows
- Python Version 3.13.2
- RobotFramework Version 7.3.2
- Additional tools like robocop, robotidy: N/A
I think this should be an enhancement.
- maybe there should be an option to enable/disable this
An option to enable/disable never hurts! I think this should be enabled (don't suggest) by default since Robot Framework will warn about using private keywords from another file during runtime.