Skip to content

Commit a47fd45

Browse files
rvaggjasnell
authored andcommitted
build: add working lint-ci make target
PR-URL: #9151 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 0cdf344 commit a47fd45

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Makefile

+11
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,17 @@ cpplint:
585585

586586
lint: jslint cpplint
587587

588+
CONFLICT_RE=^>>>>>>> [0-9A-Fa-f]+|^<<<<<<< [A-Za-z]+
589+
lint-ci: jslint cpplint
590+
@if ! ( grep -IEqrs "$(CONFLICT_RE)" benchmark deps doc lib src test tools ) \
591+
&& ! ( find . -maxdepth 1 -type f | xargs grep -IEqs "$(CONFLICT_RE)" ); then \
592+
exit 0 ; \
593+
else \
594+
echo "" >&2 ; \
595+
echo "Conflict marker detected in one or more files. Please fix them first." >&2 ; \
596+
exit 1 ; \
597+
fi
598+
588599
.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean \
589600
check uninstall install install-includes install-bin all staticlib \
590601
dynamiclib test test-all test-addons build-addons website-upload pkg \

0 commit comments

Comments
 (0)