Closed gohierf closed 3 weeks ago
On the same line as this bug and #289, the warning is also raised when the variable is used in a python evaluation
Escape Libdoc Table Char
[Documentation] Escape pipe from input string:
... - if surunded by spaces
... - if it is the ending character
[Arguments] ${val}
VAR ${output} ${{ re.sub(r' \|$', ' \|', $val) }}
VAR ${output} ${{ re.sub(r' \| ', ' \| ', $output) }}
RETURN ${output}
To elaborate on the first point: it is not only arguments that are not seen as used in WHILE parameterS, local and suite variable as well.
*** Variables ***
${MY_SUITE_VAR} foo
*** Test Cases ***
My Tes
My Keyword 10
*** Keywords ***
My Keyword
[Documentation] Showing argument not used but should not
[Arguments] ${retries}
VAR ${on_limit} FAIL
WHILE True limit=${retries}
... on_limit=${on_limit}
... on_limit_message=${MY_SUITE_VAR}
No Operation
END
Moreover, WHILE
settings limit
, on_limit
and on_limit_message
lack the autocompletion of variable name, which works on the WHILE condition.
Describe the bug
robotcode.diagnostics(VariableNotUsed)
is raised when the argument is actually used in thelimit
argument of WHILE loops.To Reproduce Steps to reproduce the behavior:
If possible add some example source code like:
Expected behavior Robotcode should recognize the argument is being used.
Screenshots/ Videos
Logs NA
Desktop (please complete the following information): VS Code Version 1.92.2 RobotCode Version 0.85.0 OS: Windows Python Version 3.11 RobotFramework Version 7.0 robocop 5.4.0 robotidy 4.11.0
Additional context NA