robotframework-robocop
robotframework-robocop copied to clipboard
[Bug] unused-argument doesn't detect certain formats of usage
What happened?
Using this file, robocop reports some unused-arguments where they are used
test.robot
*** Test Cases ***
Variable Test
Used Arguments test test test
*** Keywords ***
Used Arguments
[Arguments] ${arg1} ${arg2} ${arg3}
Log ${arg1 == "test"} level=warn
Log ${arg2} level=warn
It looks like it doesn't read the first Log properly
Using:
python 3.10.0
robocop 5.4.0
robotframwork 7.0.1
What command/code did you try to run?
python -m robocop -i unused-argument test.robot
What is the full error message?
[W] 0919 Keyword argument '${arg1}' is not used (unused-argument)
[W] 0919 Keyword argument '${arg3}' is not used (unused-argument)
What did you expect to happen instead?
Only arg3
is unused
Operating System
Windows, Linux
Robocop version
5.4.0