robotcode icon indicating copy to clipboard operation
robotcode copied to clipboard

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

Open gohierf opened this issue 1 year ago • 3 comments

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 avatar Mar 13 '24 06:03 gohierf

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

Noordsestern avatar Mar 21 '24 08:03 Noordsestern

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

gohierf avatar Mar 21 '24 13:03 gohierf