Makopo/lslint

Warns about unused function parameters should be configurable (like event parameters)

Closed this issue · 9 comments

Here is example with descriptions:

temp

Could you explain what's the use case for having unused user function parameters in your code?

This example is not using start parameter, but the first file with base functions is designed to be universal, so some another script may need a start parameter.

I mean, I have a global init function for any my scripts, and each separate script has own "local" init function. I can not be sure which parameters are needed for individual local functions in separate scripts, so when declaring a local function it must take all global parameters.

Ofcourse, this problem is actual only when you using preprocessor.

Event-initialisation functions are used around the same principle - llisten accepts empty variables when we do not know who exactly we are going to listen.

In that precise case, llGetStartParameter() can supply the appropriate information if/where necessary,

Anyway, I don't think that this justifies suppressing the warning in all cases. If you suppress it, you risk having parameters that will take memory in other parts of the code where it is an actual mistake. I think this is better handled with the method suggested in #40.

I agree. This method can be a good solution.

FYI, this has been implemented in #49 which is now merged. I don't know when @Makopo will release a version with this feature, though.

I built current version of lslint just now. Thanks.