diff options
author | Nikolai Vavilov <vvnicholas@gmail.com> | 2017-09-08 14:44:58 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2017-09-24 12:31:52 -0300 |
commit | b2eb98721e54904a4de02bf8b040f3c81793bda0 (patch) | |
tree | c338fa9158bd87dbb8d672a5787397577a280833 /Makefile | |
parent | 3c777bb37f33b1fc6c6d1df4fe5a27d7519935fd (diff) | |
download | android-node-v8-b2eb98721e54904a4de02bf8b040f3c81793bda0.tar.gz android-node-v8-b2eb98721e54904a4de02bf8b040f3c81793bda0.tar.bz2 android-node-v8-b2eb98721e54904a4de02bf8b040f3c81793bda0.zip |
build: use generic names for linting tasks
"jslint" is the name of a tool that actually is not used, which can
cause confusion.
PR-URL: https://github.com/nodejs/node/pull/15272
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 49 |
1 files changed, 29 insertions, 20 deletions
@@ -880,26 +880,32 @@ bench: bench-net bench-http bench-fs bench-tls bench-ci: bench -JSLINT_TARGETS = benchmark doc lib test tools +LINT_JS_TARGETS = benchmark doc lib test tools -jslint: +lint-js: @echo "Running JS linter..." $(NODE) tools/eslint/bin/eslint.js --cache --rulesdir=tools/eslint-rules --ext=.js,.mjs,.md \ - $(JSLINT_TARGETS) + $(LINT_JS_TARGETS) -jslint-ci: +jslint: lint-js + @echo "Please use lint-js instead of jslint" + +lint-js-ci: @echo "Running JS linter..." - $(NODE) tools/jslint.js $(PARALLEL_ARGS) -f tap -o test-eslint.tap \ - $(JSLINT_TARGETS) + $(NODE) tools/lint-js.js $(PARALLEL_ARGS) -f tap -o test-eslint.tap \ + $(LINT_JS_TARGETS) + +jslint-ci: lint-js-ci + @echo "Please use lint-js-ci instead of jslint-ci" -CPPLINT_EXCLUDE ?= -CPPLINT_EXCLUDE += src/node_root_certs.h -CPPLINT_EXCLUDE += $(wildcard test/addons/??_*/*.cc test/addons/??_*/*.h) -CPPLINT_EXCLUDE += $(wildcard test/addons-napi/??_*/*.cc test/addons-napi/??_*/*.h) +LINT_CPP_EXCLUDE ?= +LINT_CPP_EXCLUDE += src/node_root_certs.h +LINT_CPP_EXCLUDE += $(wildcard test/addons/??_*/*.cc test/addons/??_*/*.h) +LINT_CPP_EXCLUDE += $(wildcard test/addons-napi/??_*/*.cc test/addons-napi/??_*/*.h) # These files were copied more or less verbatim from V8. -CPPLINT_EXCLUDE += src/tracing/trace_event.h src/tracing/trace_event_common.h +LINT_CPP_EXCLUDE += src/tracing/trace_event.h src/tracing/trace_event_common.h -CPPLINT_FILES = $(filter-out $(CPPLINT_EXCLUDE), $(wildcard \ +LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \ src/*.c \ src/*.cc \ src/*.h \ @@ -917,19 +923,22 @@ CPPLINT_FILES = $(filter-out $(CPPLINT_EXCLUDE), $(wildcard \ tools/icu/*.h \ )) -cpplint: +lint-cpp: @echo "Running C++ linter..." - @$(PYTHON) tools/cpplint.py $(CPPLINT_FILES) + @$(PYTHON) tools/cpplint.py $(LINT_CPP_FILES) @$(PYTHON) tools/check-imports.py +cpplint: lint-cpp + @echo "Please use lint-cpp instead of cpplint" + ifneq ("","$(wildcard tools/eslint/)") lint: @EXIT_STATUS=0 ; \ - $(MAKE) jslint || EXIT_STATUS=$$? ; \ - $(MAKE) cpplint || EXIT_STATUS=$$? ; \ + $(MAKE) lint-js || EXIT_STATUS=$$? ; \ + $(MAKE) lint-cpp || EXIT_STATUS=$$? ; \ exit $$EXIT_STATUS CONFLICT_RE=^>>>>>>> [0-9A-Fa-f]+|^<<<<<<< [A-Za-z]+ -lint-ci: jslint-ci cpplint +lint-ci: lint-js-ci lint-cpp @if ! ( grep -IEqrs "$(CONFLICT_RE)" benchmark deps doc lib src test tools ) \ && ! ( find . -maxdepth 1 -type f | xargs grep -IEqs "$(CONFLICT_RE)" ); then \ exit 0 ; \ @@ -976,7 +985,6 @@ endif coverage-build \ coverage-clean \ coverage-test \ - cpplint \ dist \ distclean \ doc \ @@ -987,10 +995,11 @@ endif install \ install-bin \ install-includes \ - jslint \ - jslint-ci \ lint \ lint-ci \ + lint-cpp \ + lint-js \ + lint-js-ci \ list-gtests \ pkg \ release-only \ |