Open russplaysguitar opened 11 years ago
Disagree. parameterExists() is deprecated in favor of isDefined. Yes, many people use structKeyExists instead, BUT, that only applies when you are truly looking for a key in a scope. Of course, every variable is now in a scope. I don't know - I just feel like you should be more explicit.
Is isDefined()
still valid if all variables have scopes now?
I'm thinking that the linter will have options so that if you want to use discouraged functions you can specify that. Ideally, you'd be able to specify it for function scopes, at the file level, or as a parsing option for the linter itself.
isDefined() should be actively discouraged almost as much as parameterExists(), in my book. It's prone to false positives due to scope-searching.
I agree with @russplaysguitar and @adamcameroncoldfusion
use of
parameterExists()
should fail lint.structKeyExists()
should be used instead.