ditinc / linter-cflint

:shirt: CFLint plugin for Atom Linter
MIT License
4 stars 7 forks source link

unused-method-argument doesn't pick up scoped arguments. #18

Closed ocssor closed 7 years ago

ocssor commented 8 years ago

The rule for unused-method-arguments is a good one, however, it doesn't pick up if you've used the argument by scoping it, e.g. it will say 'foo' is unused even though 'arguments.foo' is used in the function.

ryaneberly commented 8 years ago

Can you provide a code sample.

ocssor commented 8 years ago

@ryaneberly sure:

<cffunction name="test" output="false" returntype="text">
    <cfargument name="foo" type="string" default="" hint="test">

    <cfset testFunction(arguments.foo)>

</cffunction>

Creates an 'unused-method-argument' warning.

sjmatta commented 8 years ago

@ryaneberly Is this the same as https://github.com/cflint/CFLint/issues/152?

ryaneberly commented 8 years ago

yes, and it is fixed. 0.7.2 I think.

sjmatta commented 8 years ago

It seems to still be an issue in 0.7.3, at least in linter-cflint for whatever reason, but I need to confirm. Stay tuned!

sjmatta commented 7 years ago

Seems to be resolved in linter-cflint 0.13.0