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

Only the keyword 'var' should be analyzed #2419

Closed
sharwell opened this issue Jun 16, 2017 · 0 comments
Closed

Only the keyword 'var' should be analyzed #2419

sharwell opened this issue Jun 16, 2017 · 0 comments
Assignees
Milestone

Comments

@sharwell
Copy link
Member

sharwell commented Jun 16, 2017

Currently SA1000 is getting reported in code like the following:

int[] array = new int[0];
array.Select(var => var.Equals(1)); // SA1000

SA1000 should only be reported for cases where var is a keyword, though this could be optimized to simply look at cases where var is the name of a type where a variable is being defined, or possibly just to cases where var is followed by an identifier or the opening parenthesis of a parenthesized variable designator.

@sharwell sharwell added this to the 1.1.0 Beta 4 milestone Jun 16, 2017
sharwell added a commit to sharwell/StyleCopAnalyzers that referenced this issue Jun 16, 2017
@sharwell sharwell self-assigned this Jun 16, 2017
sharwell added a commit to sharwell/StyleCopAnalyzers that referenced this issue Jun 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant