Skip to content

[Enhancement] Intellisense suggests private keywords from other files #495

@Lakitna

Description

@Lakitna

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:

  1. Make a .resource file
  2. Add 2 keywords to the file
  3. Tag 1 of the keywords with robot:private
  4. Make a .robot file
  5. Add a test
  6. 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
  1. Place cursor after P
  2. Hit ctrl + space
  3. Note that both keywords from foo.resource show up.

Expected behavior

Private keywords should not be suggested outside the file where they're created.

Screenshots/ Videos

Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions