robotframework-robocop
robotframework-robocop copied to clipboard
[enhancement] configure `non-local-variables-should-be-uppercase` to allow lower-case variables
It should be possible to configure non-local-variables-should-be-uppercase
to allow lower-case variables in it.
*** Variables ***
@{PROTOCOLS} TCP UDP
*** Test Cases ***
Test
[Documentation] Doc.
KW
*** Keywords ***
KW
[Documentation] non-local-variables-should-be-uppercase
FOR ${proto} IN @{PROTOCOLS}
${stuff} Get Stuff ${proto}
# This is good, but confusing:
Set Test Variable ${EXAMPLE_${PROTO}} ${stuff}
# This could be allowed via configure:
Set Test Variable ${EXAMPLE_${proto}} ${stuff}
END
I agree. We need better mechanism for parsing the variables though - maybe steal something from the core Robot Framework. It's now always possible to recognize what is a variable, nested variable and what just text (Robot uses dynamic context to decide that) but it should be possible to cover basic cases (especially if we at least cache the local scope),