-
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
LTS: backport no-unused-vars to v4.x-staging #4688
Conversation
There was a big combination of weird things going on getting this to backport nicely. Some commits that were part of this large change landed in LTS a week ago. Other commits landed, but with conflicts, others were not tagged for LTS and were just missed. I'd be very interested to discuss ways we can co-ordinate moving large changes like this to LTS more efficiently. As branches diverge this kind of stuff is going to get more and more difficult. |
Ci failure for In terms of how to prevent this in the future, the obvious things that leap to mind are:
If the automation idea is appealing, maybe we can open a discussion over in the nodejs/build repo? Although I imagine getting the |
(Also: Nice work, @thealphanerd!) |
e87190d
to
6d34289
Compare
592237f
to
cf7ebd3
Compare
6d34289
to
d7e2943
Compare
Many tests use require() to import modules that subsequently never gets used. This removes those imports and, in a few cases, removes other unused variables from tests. PR-URL: nodejs#4684 Reviewed-By: Myles Borins <[email protected]>
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#4683 Reviewed-By: Myles Borins <[email protected]>
Remove unused vars in tests PR-URL: nodejs#4536 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
In addition to removing unused vars, this also fixes an instance where booleans were set presumably to check something but then never used. This now confirms that the events that were setting the booleans are fired. PR-URL: nodejs#4425 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Remove a handful of variables that are declared but never used in the tests for the net module. PR-URL: nodejs#4430 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: nodejs#4426 Reviewed-By: Johan Bergström <[email protected]>
Some of the TLS tests have variables that do not get used. This removes those variables. PR-URL: nodejs#4424 Reviewed-By: Johan Bergström <[email protected]>
Debug mode slows execution speed. There is work afoot to enable Debug mode runs on the continuous integration infrastructure for the project. Some tests are timing out, such as test-net-nodejsGH-5504.js. This change doubles the timeout returned from `common.platformTimeout()` when running in Debug mode. It also removes an unused variable from the aforementioned test-net-nodejsGH-5504.js. PR-URL: nodejs#4431 Reviewed-By: Johan Bergström <[email protected]>
The http tests seem especially prone to including unused variables. This change removes them. PR-URL: nodejs#4422 Reviewed-By: Johan Bergström <[email protected]>
Remove all remaining unused variables from tests in test/parallel. PR-URL: nodejs#4511 Reviewed-By: James M Snell<[email protected]> Reviewed-By: Johan Bergström <[email protected]>
PR-URL: nodejs#4536 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
d7e2943
to
ef5e9ef
Compare
CI against current head |
CI Failures look unrelated. @jasnell are we good to land this? |
LGTM |
landed |
replaces: #4683 and #4684
Backport all changes to get LTS v4.x-staging passing the linter with no-unused-vars enabled. This involved backporting commits from 10 different PRs':