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

False positive for unused argument when argument is scoped #227

Closed
jtreher opened this issue Dec 20, 2016 · 1 comment
Closed

False positive for unused argument when argument is scoped #227

jtreher opened this issue Dec 20, 2016 · 1 comment

Comments

@jtreher
Copy link

jtreher commented Dec 20, 2016

It looks like there is a //TODO on the code for flagging a scoped argument as used. Do you happen to know what that status of this is? It creates a lot of false positives at the moment. Thanks!

https://github.com/cflint/CFLint/blob/dev/src/main/java/com/cflint/plugins/core/UnusedArgumentChecker.java

		String name = identifier.getName().toLowerCase();
		if (name.equals("arguments")) {
			name = identifier.Decompile(0).toLowerCase().replace("arguments.", ""); // TODO
																					// better
																					// way
																					// of
																					// doing
																					// this?
		}
		if (methodArguments.get(name) != null) {
			methodArguments.put(name, true);
		}
	}```
ryaneberly added a commit that referenced this issue Dec 21, 2016
ryaneberly added a commit that referenced this issue Dec 21, 2016
check local scoped references correctly.
@ryaneberly
Copy link
Contributor

fixed in dev. Thanks!

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