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 \