cflint / CFLint

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

Argument-/ComponentNameChecker ignores parameter-override "maxWords" #587

Closed HannaEckert closed 6 years ago

HannaEckert commented 6 years ago

At the moment, I'm putting together a .cflintrc that complies more to the coding conventions of the company I'm at.

We are using ColdFusion 11, together with the stable version 1.4.0 of CFLint (CFLint-1.4.0-all.jar) For running CFLint on our code, we are using the vscode extension "CFLint"

This is the .cflintrc I'm currently using: cflintrc.txt

Now, I've encountered a problem with the ArgumentNameChecker and the ComponentNameChecker: The overwritten "maxWords" parameters are simply ignored.

To reproduce and test this, I've set the parameters to something really high, like 10, and ran it on a test-component: ClassNameThatIsReallyLongButOk.cfc.cfscript.txt

This is the resulting output: 2018-09-12 10_36_29-classnamethatisreallylongbutok cfc - ventari - visual studio code

Notice how the following parameter-overrides work as expected: "VariableNameChecker.maxWords": 10 "MethodNameChecker.maxWords": 10

The same result can be produced with the same class, written in CFML syntax: ClassNameThatIsReallyLongButOk.cfc.cfml.txt

This ist the resulting output: 2018-09-12 10_42_34-classnamethatisreallylongbutok cfc - ventari - visual studio code


I've searched through the issues section for anything that resembles this problem, but haven't found another issue that targets this, so I'm creating a new one.

--- edit

I've just tested the behavior with the recent development version (commit id: ad7e24f5c0c119e628884f34d15194e6467346bd) and it still persists.

ryaneberly commented 6 years ago

@HannaEckert - welcome to github. Thanks for the detailed analysis and bug report. This is one of the best defect reports I've seen.

This issue is fixed in the dev branch and should be included in CFLint 1.4.1. If you want it in the meantime, you'll need to build it from source.