Skip to content
This repository was archived by the owner on Oct 16, 2021. It is now read-only.

Commit e80f0f0

Browse files
rvaggjBarz
authored andcommitted
build: add working lint-ci make target
PR-URL: nodejs/node#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 b9589d5 commit e80f0f0

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,17 @@ cpplint:
615615

616616
lint: jslint cpplint
617617

618+
CONFLICT_RE=^>>>>>>> [0-9A-Fa-f]+|^<<<<<<< [A-Za-z]+
619+
lint-ci: jslint cpplint
620+
@if ! ( grep -IEqrs "$(CONFLICT_RE)" benchmark deps doc lib src test tools ) \
621+
&& ! ( find . -maxdepth 1 -type f | xargs grep -IEqs "$(CONFLICT_RE)" ); then \
622+
exit 0 ; \
623+
else \
624+
echo "" >&2 ; \
625+
echo "Conflict marker detected in one or more files. Please fix them first." >&2 ; \
626+
exit 1 ; \
627+
fi
628+
618629
.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean \
619630
check uninstall install install-includes install-bin all staticlib \
620631
dynamiclib test test-all test-addons build-addons website-upload pkg \

0 commit comments

Comments
 (0)