robotcode icon indicating copy to clipboard operation
robotcode copied to clipboard

[BUG] Depending on definition pattern of variable in variables section it is shown as used or not used

Open Odehnal opened this issue 2 months ago • 0 comments

Describe the bug Depending on the way a variable is define in *** Variables *** section it is shown as used or not used ${WAIT_TIMEOUT}= 10 seconds # Usage of Variable is not found ${WAIT_TIMEOUT} 10 seconds # Usage of Variable is found

Steps To Reproduce Steps to reproduce the behavior: Use of example of RobotCode documentation https://robotcode.io/04_tip_and_tricks/02_why_variable_not_found#explicit-variable-definitions -> Pattern: Resource files with shared variables and add "=" in Variable definition

*** Settings ***
Resource    resources/common_variables.resource

*** Test Cases ***
Use Shared Variables
    Log    Timeout is ${WAIT_TIMEOUT}
    Log    Supported browsers: @{SUPPORTED_BROWSERS}
# resources/common_variables.resource
*** Variables ***
${WAIT_TIMEOUT}=         10 seconds

# Complex data structures
@{SUPPORTED_BROWSERS}   chrome    firefox    edge

Expected behavior Usage of Variable is found independently of using ${varname} or ${varname}=

Screenshots/ Videos Image Versus

Image

Logs Copy the messages from VSCode "Output" view for RobotCode and RobotCode Language Server for the specific folder/workspace.

Desktop (please complete the following information):

  • VSC: Version: 1.107.0 (user setup)

  • OS: Windows_NT x64 10.0.26100

  • RobotCode Version 2.1.0

  • Python Version 3.13.7

  • RobotFramework Version 6.1.1

  • robocop 6.13.0

Odehnal avatar Dec 16 '25 14:12 Odehnal