Skip to content

Commit

Permalink
build: add conflict marker check during CI lint
Browse files Browse the repository at this point in the history
PR-URL: #7625
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
mscdex authored and evanlucas committed Jul 21, 2016
1 parent 2e05e65 commit 71f84b5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit 71f84b5

Please sign in to comment.