Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rule] Not all If branches define variable #960

Open
bhirsz opened this issue Oct 7, 2023 · 1 comment
Open

[Rule] Not all If branches define variable #960

bhirsz opened this issue Oct 7, 2023 · 1 comment
Labels
rule Issue related to creating or changing a rule

Comments

@bhirsz
Copy link
Member

bhirsz commented Oct 7, 2023

If new variable is set in If, it should be set in all branches:

 IF  ${True}
     ${var}  Set Variable  value
ELSE
     ${var}  Set Variable  other value 
END
@bhirsz
Copy link
Member Author

bhirsz commented Oct 7, 2023

Only potential issue is global variable with default value that can be overwriten if one condition is true. But it is still better to be explicit and set it in every branch.

@mnojek mnojek added the rule Issue related to creating or changing a rule label Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Issue related to creating or changing a rule
Projects
None yet
Development

No branches or pull requests

2 participants