Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UNUSED_LOCAL_VARIABLE ignores variable usage inside of QueryExecute (QoQ) #632

Open
jaredbeck opened this issue Jul 19, 2019 · 1 comment

Comments

@jaredbeck
Copy link

  var genericData = request.newObj('dataloader').getData(redacted);

  return QueryExecute("
      select redacted, genericData.*
      from redacted, genericData
      where redacted
    ", {}, { dbtype: 'query' });
Message code:UNUSED_LOCAL_VARIABLE
        File:/Users/jared/redacted/redacted.cfc
        Column:6
        Line:78
                Message:Local variable genericData is not used in function getData. Consider removing it.
                Variable:'genericData' in function: getData

This issue is distinct from #153. That issue also dealt with QoQ, but in <cfquery>, not QueryExecute.

@jaredbeck
Copy link
Author

This issue should be a tough one, since the variable usage is inside a QoQ string. I doubt a QoQ string parser already exists!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants