summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRichard Lau <riclau@uk.ibm.com>2020-05-06 11:20:14 -0400
committerRichard Lau <riclau@uk.ibm.com>2020-05-28 10:02:46 -0400
commit05db68245ba63bc908d09c1cc64098ce97fa9d1f (patch)
treeb5c6621c8db0216c71f73c2cd5a963f08ee5d1c7 /Makefile
parent4a20cc937f6a2b830a2752e35da7e389bbc4e006 (diff)
downloadnode-new-05db68245ba63bc908d09c1cc64098ce97fa9d1f.tar.gz
tools: fix check-imports.py to match on word boundaries
`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: https://github.com/nodejs/node/pull/33268 Refs: https://github.com/nodejs/node/issues/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>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 7a6e3d5c32..519e920685 100644
--- a/Makefile
+++ b/Makefile
@@ -1328,13 +1328,13 @@ else
CPPLINT_QUIET = --quiet
endif
.PHONY: lint-cpp
-# Lints the C++ code with cpplint.py and check-imports.py.
+# Lints the C++ code with cpplint.py and checkimports.py.
lint-cpp: tools/.cpplintstamp
tools/.cpplintstamp: $(LINT_CPP_FILES)
@echo "Running C++ linter..."
@$(PYTHON) tools/cpplint.py $(CPPLINT_QUIET) $?
- @$(PYTHON) tools/check-imports.py
+ @$(PYTHON) tools/checkimports.py
@touch $@
.PHONY: lint-addon-docs