-
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.
fix: unused-variable with variables in [Setup], [Teardown] and [Timeo…
…ut] (#1063)
- Loading branch information
Showing
5 changed files
with
35 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
unused-variable when the variable is used in a Test Setup (#1062) | ||
------------------------------------------------------------------ | ||
|
||
I0920 ``unused-variable`` was incorrectly reported if the variable was declared in the ``*** Variables ***`` section | ||
and used in ``[Setup]``, ``[Teardown]`` or ``[Timeout]``. |
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
20 changes: 10 additions & 10 deletions
20
tests/atest/rules/misc/unused_variable/expected_output_after_var.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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
test.robot:14:5:14:11 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:18:15:18:22 [I] 0920 Variable '${var2}' is assigned but not used | ||
test.robot:22:5:22:11 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:30:5:30:14 [I] 0920 Variable '${assign}' is assigned but not used | ||
test.robot:41:12:41:18 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:67:12:67:23 [I] 0920 Variable '${category}' is assigned but not used | ||
test.robot:115:5:115:11 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:118:5:118:14 [I] 0920 Variable '${assign}' is assigned but not used | ||
test.robot:121:12:121:23 [I] 0920 Variable '${not_used}' is assigned but not used | ||
test.robot:129:12:129:23 [I] 0920 Variable '${variable}' is assigned but not used | ||
test.robot:15:5:15:11 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:19:15:19:22 [I] 0920 Variable '${var2}' is assigned but not used | ||
test.robot:23:5:23:11 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:31:5:31:14 [I] 0920 Variable '${assign}' is assigned but not used | ||
test.robot:42:12:42:18 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:68:12:68:23 [I] 0920 Variable '${category}' is assigned but not used | ||
test.robot:116:5:116:11 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:119:5:119:14 [I] 0920 Variable '${assign}' is assigned but not used | ||
test.robot:122:12:122:23 [I] 0920 Variable '${not_used}' is assigned but not used | ||
test.robot:130:12:130:23 [I] 0920 Variable '${variable}' is assigned but not used | ||
unused_section_vars.robot:21:1:21:19 [I] 0920 Variable '${GLOBAL_NOT_USED}' is assigned but not used |
16 changes: 8 additions & 8 deletions
16
tests/atest/rules/misc/unused_variable/expected_output_pre_var.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
test.robot:14:5:14:11 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:18:15:18:22 [I] 0920 Variable '${var2}' is assigned but not used | ||
test.robot:22:5:22:11 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:30:5:30:14 [I] 0920 Variable '${assign}' is assigned but not used | ||
test.robot:41:12:41:18 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:67:12:67:23 [I] 0920 Variable '${category}' is assigned but not used | ||
test.robot:115:5:115:11 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:118:5:118:14 [I] 0920 Variable '${assign}' is assigned but not used | ||
test.robot:15:5:15:11 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:19:15:19:22 [I] 0920 Variable '${var2}' is assigned but not used | ||
test.robot:23:5:23:11 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:31:5:31:14 [I] 0920 Variable '${assign}' is assigned but not used | ||
test.robot:42:12:42:18 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:68:12:68:23 [I] 0920 Variable '${category}' is assigned but not used | ||
test.robot:116:5:116:11 [I] 0920 Variable '${var}' is assigned but not used | ||
test.robot:119:5:119:14 [I] 0920 Variable '${assign}' is assigned but not used | ||
unused_section_vars.robot:21:1:21:19 [I] 0920 Variable '${GLOBAL_NOT_USED}' is assigned but not used |
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