You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# robocop: disable=missing-doc-suite,missing-doc-test-case
*** Test Cases ***
Test Unused Var
${used_var} Set Variable foo
IF $used_var == "foo"
Log "Is foo"
ELSE
Fail "Is not foo"
END
Reports under Python 3.12.0:
ugreport.robot:4:5 [I] 0920 Variable '${used_var}' is assigned but not used (unused-variable)
pip list |grep robo
robotframework 6.1.1
robotframework-requests 0.9.5
robotframework-robocop 4.1.1
Python Versions:
python --version
Python 3.12.0
Robocop command:
robocop --reports all bugreport.robot
bugreport.robot:4:5 [I] 0920 Variable '${used_var}' is assigned but not used (unused-variable)
Processed 1 file from which 1 file contained issues.
Found 1 issue: 1 INFO.
Report generated by Robocop version: 4.1.1
Issues by ID:
I0920 (unused-variable) : 1
Scan finished in 0.006s.
Reported: 2023-10-09 16:44:51 +0300
bugreport.robot:4:5 [I] 0920 Variable '${used_var}' is assigned but not used (unused-variable)
What did you expect to happen instead?
I expect it to not report anything like with Python 3.11.x
Robotframework versions
pip list | grep robot
robotframework 6.1.1
robotframework-robocop 4.1.1
Python Versions:
python --version
Python 3.11.4
Robocop command:
robocop --reports all bugreport.robot
Processed 1 file but no issues were found.
Found 0 issues.
Report generated by Robocop version: 4.1.1
Issues by ID:
No issues found.
Scan finished in 0.007s.
Reported: 2023-10-09 16:48:36 +0300
What happened?
The following example:
Reports under Python 3.12.0:
ugreport.robot:4:5 [I] 0920 Variable '${used_var}' is assigned but not used (unused-variable)
Under Python 3.11.4 this is not reported.
Not sure but it might be related to the changes mentioned in robotframework/robotframework#4771 and python/cpython#104802.
What command/code did you try to run?
Robotframework versions
Python Versions:
Robocop command:
Robot command:
What is the full error message?
bugreport.robot:4:5 [I] 0920 Variable '${used_var}' is assigned but not used (unused-variable)
What did you expect to happen instead?
I expect it to not report anything like with Python 3.11.x
Robotframework versions
Python Versions:
Robocop command:
Robot command:
Operating System
Linux
Robocop version
4.1.1
The text was updated successfully, but these errors were encountered: