cflint / CFLint

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

NPE while linting a pretty simple include #644

Closed sbleon closed 4 years ago

sbleon commented 4 years ago

File:

<cfinclude template="../querytool.cfm">

Result:

java.lang.NullPointerException
    at com.cflint.tools.CFMLTagInfo.isAssignmentAttribute(CFMLTagInfo.java:61)
    at com.cflint.tools.CFMLTagInfo.isExpressionAttribute(CFMLTagInfo.java:96)
    at com.cflint.tools.CFMLTagInfo.isExpressionAttribute(CFMLTagInfo.java:81)
    at com.cflint.CFLint.unpackTagExpressions(CFLint.java:681)
    at com.cflint.CFLint.process(CFLint.java:624)
    at com.cflint.CFLint.processStack(CFLint.java:399)
    at com.cflint.CFLint.process(CFLint.java:342)
    at com.cflint.CFLint.process(CFLint.java:606)
    at com.cflint.CFLint.processStack(CFLint.java:399)
    at com.cflint.CFLint.process(CFLint.java:342)
    at com.cflint.CFLint.scan(CFLint.java:295)
    at com.cflint.CFLint.scan(CFLint.java:206)
    at com.cflint.api.CFLintAPI.scan(CFLintAPI.java:65)
    at com.cflint.cli.CFLintCLI.execute(CFLintCLI.java:371)
    at com.cflint.cli.CFLintCLI.main(CFLintCLI.java:339)
Error: "null" Location: com.cflint.tools.CFMLTagInfo.isAssignmentAttribute(CFMLTagInfo.java:61)
zspitzer commented 4 years ago

Which version? Can U post a test case?

sbleon commented 4 years ago

This was with v1.4.1. I haven't yet set up the code locally so I can't set up a test case at the moment.

sbleon commented 4 years ago

I can't reproduce this anymore.