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

[ENHANCEMENT] Warning when assigning keyword output, with keyword without RETURN statement. #238

Open
gohierf opened this issue Mar 13, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@gohierf
Copy link

gohierf commented Mar 13, 2024

Is your enhancement request related to a problem? Please describe.
The current absence of warnings in the RobotCode extension when assigning a keyword's return value to a variable without a corresponding RETURN statement poses a risk of undetected errors. Additionally, there is no alert for assigning values of incompatible types (e.g., assigning a returned dictionary to a list variable or vice versa).

image

Describe the solution you'd like
I propose the implementation of a warning mechanism in the RobotCode extension. This mechanism should alert users when they attempt to assign a keyword's return value to a variable without a corresponding RETURN statement in the keyword. Furthermore, the extension should provide warnings for attempts to assign values of incompatible types.

Describe alternatives you've considered
Currently, users need to manually track and ensure the compatibility of assigned values, which is error-prone. A warning system within the extension would proactively notify users of potential issues, enhancing code reliability.

@gohierf gohierf added the enhancement New feature or request label Mar 13, 2024
@gohierf
Copy link
Author

gohierf commented Mar 13, 2024

Discussion on Slack.

@Noordsestern
Copy link
Member

I see the point and agree. Would this feature be better provided by robotcode or robocop?

@gohierf
Copy link
Author

gohierf commented Mar 21, 2024

Yes, if robocop can do it, then I think it would be better that robocop handles this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants