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

Duplicate "Temporary variable could be named better" warnings #223

Closed
mpaluchowski opened this issue Dec 7, 2016 · 1 comment
Closed

Comments

@mpaluchowski
Copy link
Contributor

mpaluchowski commented Dec 7, 2016

The following code:

component {
    function foo() {
        var tempStruct = {};
        doSomething(tempStruct);
        tempStruct.foo = "bar";
    }
}

Will produce the warning "Temporary variable tempStruct could be named better." 3 times, one for each of the occurrences of the variable tempStruct.

My expectation would be that the warning be triggered only once, for the line var tempStruct = {}; where the variable is declared.

ryaneberly pushed a commit that referenced this issue Dec 10, 2016
@ryaneberly
Copy link
Contributor

fixed

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