-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore nested variables in rules 0309 and 0310 (#813)
* Update Bug Report template * Small update to deprecation message * Fix 0310 rule to ignore nested variables * Update also W0309 section-variable-not-uppercase rule * Fixes after review, add release notes * Fix conditions * Fixes * Refactor * Fix tests for RF3 * Update release notes, refactor * Extend test code
- Loading branch information
Showing
12 changed files
with
211 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
:orphan: | ||
|
||
============= | ||
Robocop 3.1.0 | ||
============= | ||
|
||
<Release description> | ||
|
||
You can install the latest available version by running | ||
|
||
:: | ||
|
||
pip install --upgrade robotframework-robocop | ||
|
||
or to install exactly this version | ||
|
||
:: | ||
|
||
pip install robotframework-robocop==3.1.0 | ||
|
||
.. contents:: | ||
:depth: 2 | ||
:local: | ||
|
||
Most important changes | ||
====================== | ||
|
||
Change title (#0) | ||
----------------------------------------------- | ||
|
||
Description | ||
|
||
Rule changes | ||
============ | ||
|
||
Rules W0310 and W0309 now handle nested variables (#678) | ||
------------------------------------------------------------------------------------------ | ||
|
||
Rules W0310 ``non-local-variables-should-be-uppercase`` and W0309 ``section-variable-not-uppercase`` | ||
were previously reporting when the variable had another nested variable with lowercase name, | ||
e.g. `${EXAMPLE_${lowercase}}`. | ||
Now, the nested variable names passed as an argument to one of the keywords `Set Test Variable`, | ||
`Set Suite Variable` or `Set Global Variable` are ignored and if the rest of the name is uppercase, the rules | ||
will not report the issue anymore. | ||
For variables in Variables section, the name still needs to be all uppercase (including | ||
nested variable), because all nested variables in this section need to be global anyway. | ||
|
||
|
||
Other features | ||
============== | ||
|
||
Feature title (#0) | ||
-------------------------------- | ||
|
||
Description | ||
|
||
Acknowledgements | ||
================ | ||
|
||
Thanks to... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
tests/atest/rules/naming/section_variable_not_uppercase/expected_output_rf3.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
test.robot:5:1 [W] 0309 Section variable '${my_var}' name should be uppercase | ||
test.robot:6:1 [W] 0309 Section variable '${My Var}' name should be uppercase | ||
test.robot:7:1 [W] 0309 Section variable '${my var}' name should be uppercase | ||
test.robot:8:1 [W] 0309 Section variable '${MyVar}' name should be uppercase | ||
test.robot:9:1 [W] 0309 Section variable '${My_Var}' name should be uppercase | ||
test.robot:10:1 [W] 0309 Section variable '${myVar}' name should be uppercase | ||
test.robot:11:1 [W] 0309 Section variable '${MY_var}' name should be uppercase | ||
test.robot:14:1 [W] 0309 Section variable '${my_var}' name should be uppercase | ||
test.robot:21:1 [W] 0309 Section variable '@{var4}' name should be uppercase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters