-
-
Notifications
You must be signed in to change notification settings - Fork 383
Closed
Labels
enhancementNew feature or requestNew feature or requestpriority.lowA low priority topicA low priority topic
Milestone
Description
This is a feature request. Whenever one writes functions against implementing some interface (e.g. that will be called by external code), it's common to have parameters that may not be used:
local myFunction(arg1, arg2)
print('This function doesn't actually use the args passed to it.)
end
A lot of the time it's useful to keep these args listed for documentation/standardization purposes. A common cross-language convention is to prefix known unused variables with a leading underscore:
local myFunction(_arg1, _arg2)
print("This function doesn't actually use the args passed to it.")
end
Right now (so far as I can tell), there is no way to turn off the unused variable warnings for just variables with a leading underscore-- you either turn off all unused variable warnings, or none. I think it would be good to provide a "Lua.diagnostics.unusedVariableIgnorePattern"
or similar.
idbrii, j-hui, dkarter, Ordoviz, ilkecan and 4 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpriority.lowA low priority topicA low priority topic