[Bug] Unused argument not detected if part of string literal
rikerfi opened this issue · comments
What happened?
Rule 0919 Keyword argument is not used (unused-argument)
is not working right if an argument is part of a string literal.
What command/code did you try to run?
*** Settings ***
Documentation Unused argument
*** Test Cases ***
Argument Test
[Documentation] TC
Say Greetings Hi Peter
*** Keywords ***
Say Greetings
[Documentation] KW
[Arguments] ${greetings} ${dude}
Log ${greetings} dude
I noticed that the following keyword is detected correctly.
Say Greetings All Unused
[Documentation] KW - This works fine.
[Arguments] ${greetings} ${dude}
Log greetings dude
What is the full error message?
No rule 0919 violation detected.
What did you expect to happen instead?
[W] 0919 Keyword argument '${dude}' is not used (unused-argument)
Operating System
Linux
Robocop version
4.2.0
Thanks for the report - I made a typo and added extra "$" (to the code that handles special syntax with $variable
) and this lead to this unexpected bevahour.
Fix released in the Robocop 4.2.1