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

CFScript function length check is off by one #709

Open
adamcameron opened this issue Jun 30, 2021 · 1 comment
Open

CFScript function length check is off by one #709

adamcameron opened this issue Jun 30, 2021 · 1 comment

Comments

@adamcameron
Copy link

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
Copy link

I can confirm this behavior.

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

No branches or pull requests

2 participants