-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
lib: remove unused modules #4396
Conversation
Some files in `lib` were using `require` to load modules that were subsequently not used in the file. This removes those `require` statements.
ppcle-ubuntu1404 failure looks like Jenkins/build problem. |
CI looks good other than aforementioned ppcle-ubuntu1404 issue that seems unrelated. |
It's 99.999% my bad; currently rewriting init scripts in upstart so they respawn if they go down. Not sure why the Edit: |
LGTM |
LGTM. Any reason we aren't linting for unused variables? |
@cjihrig we would need the |
@cjihrig Linting for unused variables would require us fixing 700+ instances of the issue in the code. The ones I've submitted are uncontroversial ones, but some might result in some debate and discussion, so I'd like to do all the straightforward ones like this one first so the discussion is around the 70 or 80 (guessing) potentially-controversial ones and doesn't hold up the hundreds of ones that should sail through. Here's an example of one that might result in a prolonged discussion: There are three unused vars in Line 953 in d847a74
On the one hand, id isn't used in that function. On the other hand, removing it from the function signature may make it less clear that it is an analogue to the function with the same signature at Line 961 in d847a74
var statement is never used, so I'm removing it".
|
The |
For |
Maybe I missed it but, what is the reason why we can't upgrade our copy of eslint? |
@mscdex Basically the way we did indentation is not compatible with the latest versions and to fix that we'd have to introduce around 174 lines of "churn" in |
Some files in `lib` were using `require` to load modules that were subsequently not used in the file. This removes those `require` statements. PR-URL: nodejs#4396 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Landed in fdeb862 |
Some files in `lib` were using `require` to load modules that were subsequently not used in the file. This removes those `require` statements. PR-URL: nodejs#4396 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@Trott it looks like these changes are breaking v4.x-staging. Would you be able to backport the changes and open a PR against v4.x-staging? |
Some files in `lib` were using `require` to load modules that were subsequently not used in the file. This removes those `require` statements. PR-URL: nodejs#4396 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Some files in
lib
were usingrequire
to load modules that weresubsequently not used in the file. This removes those
require
statements.