CFScript function length check is off by one
adamcameron opened this issue · comments
Adam Cameron commented
v1.5 (via commandbox-cflint, v2.3)
Here's a gist with a CFScript function that is 100 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/script.cfm
102 test/cflint/script.cfm
root@3200b7c82b5e:/app# box cflint test/cflint/script.cfm
Total Files: 1
Total Lines: 103
WARNINGS: 1
/app/test/cflint/script.cfm 1
WARNING: EXCESSIVE_FUNCTION_LENGTH, Function scriptOnlyFunction100Lines is 101 lines. Should be fewer than 100 lines. [2,1]
root@3200b7c82b5e:/app#
bhartsfield commented
I can confirm this behavior.