-
Notifications
You must be signed in to change notification settings - Fork 12
Check UnusedVariable
github-actions[bot] edited this page Apr 6, 2026
·
10 revisions
unused-variable - If a local variable is declared but not used, it is dead code and should be removed. Doing so will improve maintainability as developers will not wonder what the variable is used for
_method exemplar.hello(name)
_local message << "Hello " + name # message is an unused variable
print("Hello " + name)
_endmethod
_method exemplar.hello(name)
_local message << "Hello " + name
print(message)
_endmethod
If you have enabled checking the parameters as well, you should use all parameters as well.
_method exemplar.hello(name) # name is an unused parameter
_local message << "Hello World!"
print(message)
_endmethod
_method exemplar.hello(name)
_local message << "Hello " + name
print(message)
_endmethod
| Option | Default value | Description |
|---|---|---|
| unused-variable.check-parameters | false | Check for unused parameters |
Note
This page is generated. Any changes made to this page through the wiki will be lost in the future.