cflint / CFLint

Static code analysis for CFML (a linter)
BSD 3-Clause "New" or "Revised" License
174 stars 84 forks source link

ARG_VAR_MIXED reports the wrong line number #471

Closed zspitzer closed 4 years ago

zspitzer commented 7 years ago

Using CFLint with Sublimelinter, when there are mixed references to variables in the arguments scope, the highlighted row isn't the first conflicting use, but following conflict.

image

I'd expect line 6 to be highlighted, rather than line 7

CFlintTestCase.cfc.txt

ryaneberly commented 5 years ago

fixed in dev

KamasamaK commented 5 years ago

I'm not sure why it's triggering now in the first place since event is never declared in the local scope. It didn't trigger in 1.4.1. Also, now 4 testVarAndArgs tests are failing.

ryaneberly commented 4 years ago

all tests are passing in dev closing this one

KamasamaK commented 4 years ago

@ryaneberly Yes, tests are passing now. I'm still not sure about this rule, though. event was never declared as a local variable, so the issue is misleading. It seems to me that it's just complaining that the second reference is not explicitly scoped.