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

http: remove variable redeclaration #4612

Closed
wants to merge 1 commit into from
Closed

Conversation

Trott
Copy link
Member

@Trott Trott commented Jan 10, 2016

In lib/_http_client.js, the variable conn was declared with the var
keyword three times in the same scope. This change eliminates the
variable entirely.

In lib/_http_client.js, the variable `conn` was declared with the `var`
keyword three times in the same scope. This change eliminates the
variable entirely.
@Trott Trott added the http label Jan 10, 2016
@Trott
Copy link
Member Author

@Trott Trott commented Jan 10, 2016

@silverwind
Copy link
Contributor

@silverwind silverwind commented Jan 11, 2016

LGTM. We should investigate enabling the corresponding linter rule.

@Trott
Copy link
Member Author

@Trott Trott commented Jan 11, 2016

@silverwind That's what I'm working towards. Here's what it looks like right now against master. It's looks more fearsome than it is because many instances are reported multiple times for whatever reason. Like, this PR fixes two instances of redeclaration, but it's reported as something like 38 instances for some reason. So, boom, this little PR gets rid of "38" instances of the 563 instances reported.

@targos
Copy link
Member

@targos targos commented Jan 11, 2016

LGTM

@silverwind
Copy link
Contributor

@silverwind silverwind commented Jan 11, 2016

@Trott Looks like a bug in our version of eslint, my local eslint@1.10.3 does only give one error per line.

@cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Jan 11, 2016

LGTM if the CI is happy.

@jasnell
Copy link
Member

@jasnell jasnell commented Jan 11, 2016

LGTM

jasnell added a commit that referenced this issue Jan 11, 2016
In lib/_http_client.js, the variable `conn` was declared with the `var`
keyword three times in the same scope. This change eliminates the
variable entirely.

PR-URL: #4612
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell
Copy link
Member

@jasnell jasnell commented Jan 11, 2016

Landed in bbaf0f9

@jasnell jasnell closed this Jan 11, 2016
MylesBorins pushed a commit that referenced this issue Jan 11, 2016
In lib/_http_client.js, the variable `conn` was declared with the `var`
keyword three times in the same scope. This change eliminates the
variable entirely.

PR-URL: #4612
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Jan 11, 2016
MylesBorins pushed a commit that referenced this issue Jan 12, 2016
In lib/_http_client.js, the variable `conn` was declared with the `var`
keyword three times in the same scope. This change eliminates the
variable entirely.

PR-URL: #4612
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 28, 2016
In lib/_http_client.js, the variable `conn` was declared with the `var`
keyword three times in the same scope. This change eliminates the
variable entirely.

PR-URL: #4612
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Feb 11, 2016
In lib/_http_client.js, the variable `conn` was declared with the `var`
keyword three times in the same scope. This change eliminates the
variable entirely.

PR-URL: #4612
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit to MylesBorins/node that referenced this issue Feb 11, 2016
In lib/_http_client.js, the variable `conn` was declared with the `var`
keyword three times in the same scope. This change eliminates the
variable entirely.

PR-URL: nodejs#4612
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Feb 11, 2016
MylesBorins pushed a commit to MylesBorins/node that referenced this issue Feb 15, 2016
In lib/_http_client.js, the variable `conn` was declared with the `var`
keyword three times in the same scope. This change eliminates the
variable entirely.

PR-URL: nodejs#4612
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
scovetta pushed a commit to scovetta/node that referenced this issue Apr 2, 2016
In lib/_http_client.js, the variable `conn` was declared with the `var`
keyword three times in the same scope. This change eliminates the
variable entirely.

PR-URL: nodejs#4612
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@Trott Trott deleted the redecl-http branch Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants