tools: fix check-imports.py to match on word boundaries#33268
Merged
richardlau merged 2 commits intonodejs:masterfrom May 28, 2020
Merged
tools: fix check-imports.py to match on word boundaries#33268richardlau merged 2 commits intonodejs:masterfrom
richardlau merged 2 commits intonodejs:masterfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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