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
Robot Framework still have flat, common variables namespace. When you define the same variable in more than one resource or variablefile, and import them both, execution results may be unpredictable. That would be great if robocop will catch such problems.
The text was updated successfully, but these errors were encountered:
I've made this for our codebase (which is proprietary, unfortunately). I did not build it in Robocop though.
Instead, I made a runtime keyword that logs all variables with duplicate values. But this only works when Robot has created the current scope (e.g. did all imports). This is why I needed to do it in the Robot runtime instead of Robocop.
While writing this I realize that we might have a small communication issue here. Are we talking about:
Duplicate variable names
For example, the variable ${foo} is defined in both amazing.resource and beautiful.resource
I believe the author of the thread is talking about 1). Which is quite unpredictable in Robot Framework. If you import resource, and it imports another, you will have hard time tracking which variable will be finally used (it depends on the order of imports etc). It's now currently possible to catch this in our linter, but maybe it would in the Robotcode (as he already finds not used keywords etc in his IDE plugin and tool). We may benefit from potential cooperation between Robocop and Robotcode.
Robot Framework still have flat, common variables namespace. When you define the same variable in more than one resource or variablefile, and import them both, execution results may be unpredictable. That would be great if robocop will catch such problems.
The text was updated successfully, but these errors were encountered: