tools: fix check-imports.py to match on word boundaries#33268
tools: fix check-imports.py to match on word boundaries#33268richardlau merged 2 commits intonodejs:masterfrom
Conversation
|
I've no idea why but the GitHub Actions run is only showing one file ( The CI run (https://ci.nodejs.org/job/node-test-linter/34578/console) looks to agree with the list in the OP. |
|
@nodejs/automation @nodejs/python PTAL |
bnoordhuis
left a comment
There was a problem hiding this comment.
LGTM, thanks. The fix-ups should be done in the same commit, or in a commit preceding the changes to the python script, that way make test keeps passing (important for git bisect.)
dc5e574 to
a7737c0
Compare
In the absence of anyone advocating the fix ups be done in smaller commits and since @danbev applied the code fix ups in #33565 I've cherry-picked his commit over here and reordered so it comes first. |
This commit removes the unused using declarations reported by lint-cpp. PR-URL: nodejs#33268 Refs: nodejs#29226 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
`check-imports.py` was missing some unused `using` statements as it was not matching on word boundaries (e.g. `MaybeLocal` was considered a use of `Local`). Fix that and add some unit tests (which required the script to be renamed to drop the `-` so it could be imported into the test script). PR-URL: nodejs#33268 Refs: nodejs#29226 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
|
Landed in 785842a...05db682. |
This commit removes the unused using declarations reported by lint-cpp. PR-URL: #33268 Refs: #29226 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
`check-imports.py` was missing some unused `using` statements as it was not matching on word boundaries (e.g. `MaybeLocal` was considered a use of `Local`). Fix that and add some unit tests (which required the script to be renamed to drop the `-` so it could be imported into the test script). PR-URL: #33268 Refs: #29226 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
This commit removes the unused using declarations reported by lint-cpp. PR-URL: #33268 Refs: #29226 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
`check-imports.py` was missing some unused `using` statements as it was not matching on word boundaries (e.g. `MaybeLocal` was considered a use of `Local`). Fix that and add some unit tests (which required the script to be renamed to drop the `-` so it could be imported into the test script). PR-URL: #33268 Refs: #29226 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
`check-imports.py` was missing some unused `using` statements as it was not matching on word boundaries (e.g. `MaybeLocal` was considered a use of `Local`). Fix that and add some unit tests (which required the script to be renamed to drop the `-` so it could be imported into the test script). PR-URL: #33268 Refs: #29226 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
This commit removes the unused using declarations reported by lint-cpp. PR-URL: #33268 Refs: #29226 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
check-imports.pywas missing some unusedusingstatements as itwas not matching on word boundaries (e.g.
MaybeLocalwas considereda use of
Local). Fix that and add some unit tests (which requiredthe script to be renamed to drop the
-so it could be imported intothe test script).
Refs: #29226
Marking as
blockedas now the script is fixed it reveals the following unused imports:#33261 will fix the ones in
src/node.cc. Anyone have opinions on the best way to fix the remainder commit-wise? Should we fix them all in one commit, or try to group them up (e.g.src/node_report.ccandsrc/node_report_module.ccare thereportsubsystem)? @nodejs/releasers would it be easier to backport if they were all fixed up under one pull request or under several smaller pull requests?Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes