robotcodedev / robotcode

RobotFramework support for Visual Studio Code
https://robotcode.io
Apache License 2.0
177 stars 14 forks source link

[ENHANCEMENT] Accept `${_}` variable as purposefully not used #258

Closed gohierf closed 3 weeks ago

gohierf commented 4 months ago

Is your enhancement request related to a problem? Please describe. I get the following warning: Variable '${_}' is not used.robotcode.diagnostics(VariableNotUsed)

For instance, when ignoring some of the output of a multi-output keyword.

Robocop unused-variable rule supports this convention.

Describe the solution you'd like I would like Robotcode to ignore ${_} when checking for unused variables.

Describe alternatives you've considered I could use # robotcode: ignore or better now # robotcode: ignore[variable-not-used]

Additional context I think the convention of using _ for throwaway variables in Python is worth adding to Robotcode.

d-biehl commented 4 months ago

That's a good point!!!