CFLint seems to have trouble parsing arrow functions - the following code has lint errors, but there is no output when running cflint
component {
function chase(required numeric modifier) {
test = now(); # MISSING_VAR
modifier = 0; # ARG_VAR_CONFLICT
test2 = structNew(); # MISSING_VAR, AVOID_USING_STRUCTNEW
var nums = [1, 2, 3];
var total = nums.reduce((num, result) => {
return result += num;
}, 0);
return total * modifier;
}
}
When you remove the arrow function or replace with 'function()' syntax, the errors will show.
CFLint seems to have trouble parsing arrow functions - the following code has lint errors, but there is no output when running cflint
When you remove the arrow function or replace with 'function()' syntax, the errors will show.