cflint / CFLint

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

CFScript in <cffunction> length check doesn't work #710

Open adamcameron opened 3 years ago

adamcameron commented 3 years ago

v1.5 (via commandbox-cflint, v2.3)

Here's a gist with a function defined via <cffunction> tags with a CFScript body that is 101 lines long.

I am using this .cflintrc file, in the same directory:

{
    "rule": [ ],
    "excludes": [ ],
    "includes": [
        {"code": "EXCESSIVE_FUNCTION_LENGTH"}
    ],
    "inheritParent": false,
    "parameters": {}
}

Here's the output of my test run:

root@3200b7c82b5e:/app# wc -l test/cflint/scriptInFunction.cfm
101 test/cflint/scriptInFunction.cfm
root@3200b7c82b5e:/app# box cflint test/cflint/scriptInFunction.cfm

        Total Files:    1
        Total Lines:    102

root@3200b7c82b5e:/app#

It should be reporting a warning.