From a47fd4549d9e8abfb92d082e2b8d055f4e06a4f0 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 18 Oct 2016 18:56:38 +1100 Subject: [PATCH] build: add working lint-ci make target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/9151 Reviewed-By: Ben Noordhuis Reviewed-By: Minwoo Jung Reviewed-By: Johan Bergström Reviewed-By: James M Snell --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index c18a549c7764f4..0b348cd7bf95b8 100644 --- a/Makefile +++ b/Makefile @@ -585,6 +585,17 @@ cpplint: lint: jslint cpplint +CONFLICT_RE=^>>>>>>> [0-9A-Fa-f]+|^<<<<<<< [A-Za-z]+ +lint-ci: jslint cpplint + @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 ; \ + else \ + echo "" >&2 ; \ + echo "Conflict marker detected in one or more files. Please fix them first." >&2 ; \ + exit 1 ; \ + fi + .PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean \ check uninstall install install-includes install-bin all staticlib \ dynamiclib test test-all test-addons build-addons website-upload pkg \