summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBrian White <mscdex@mscdex.net>2016-07-08 19:22:46 -0400
committerBrian White <mscdex@mscdex.net>2016-07-20 19:05:25 -0400
commit68b966b2de265c9c5090b4299beee4e99ee733b1 (patch)
tree71be3949a2bcf19ef1a26f34972626f786d5aaae /Makefile
parent814b8c3cf796efa710ec1874ec4a30f7d50222cb (diff)
downloadandroid-node-v8-68b966b2de265c9c5090b4299beee4e99ee733b1.tar.gz
android-node-v8-68b966b2de265c9c5090b4299beee4e99ee733b1.tar.bz2
android-node-v8-68b966b2de265c9c5090b4299beee4e99ee733b1.zip
build: add conflict marker check during CI lint
PR-URL: https://github.com/nodejs/node/pull/7625 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index f66d1732fc..d82926dab7 100644
--- a/Makefile
+++ b/Makefile
@@ -706,7 +706,16 @@ cpplint:
ifneq ("","$(wildcard tools/eslint/bin/eslint.js)")
lint: jslint cpplint
+CONFLICT_RE=^>>>>>>> [0-9A-Fa-f]+|^<<<<<<< [A-Za-z]+
lint-ci: jslint-ci 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
else
lint:
@echo "Linting is not available through the source tarball."