Closed laserbyte closed 9 years ago
You are saying CFLint is not firing a ARG_DEFAULT_MISSING message, correct?
Yes, apparently I misread the warning. As soon as I added a blank default the warning went away:
ARG_DEFAULT_MISSING is an attempt to help ensure your API doesn't do something unexpected when the caller doesn't pass all the arguments.
We could disable this rule for the onXXX callback functions in Application.cfc.
Especially given the example in the Adobe docs..
What do you think?
Honestly my preference would be to keep flagging the error, but just get some clarification from Adobe on what a reasonable default for the AppScope parameter actually is. Unfortunately the docs for 11 don't seem to be much better:
https://wikidocs.adobe.com/wiki/display/coldfusionen/onSessionEnd
I agree with keeping the flag as is.
I would argue that you should just make it required="true", instead of trying to figure out what a good default value would be.
This is a callback function from the system, and the system probably is going to be sending that 2nd parameter all of the time. It's going to be consistent anyway.
I'm running the latest CFLint built from the source of the master branch. Here is my code from my Application.cfc.