make checkdiff does CI documentation checks (#900)

Fixes #744
This commit is contained in:
Rangi
2021-06-24 17:49:08 -04:00
committed by GitHub
parent 9868a01163
commit 6d2db2ef64
4 changed files with 104 additions and 3 deletions

View File

@@ -49,6 +49,9 @@ YFLAGS ?= -Wall
BISON := bison
RM := rm -rf
# Used for checking pull requests
BASE_REF := origin/master
# Rules to build the RGBDS binaries
all: rgbasm rgblink rgbfix rgbgfx
@@ -189,9 +192,8 @@ checkcodebase:
# the first common commit between the HEAD and origin/master.
# `.y` files aren't checked, unfortunately...
BASE_REF:= origin/master
checkpatch:
$Qeval COMMON_COMMIT=$$(git merge-base HEAD ${BASE_REF}); \
$QCOMMON_COMMIT=`git merge-base HEAD ${BASE_REF}`; \
for commit in `git rev-list $$COMMON_COMMIT..HEAD`; do \
echo "[*] Analyzing commit '$$commit'"; \
git format-patch --stdout "$$commit~..$$commit" \
@@ -199,6 +201,11 @@ checkpatch:
| ${CHECKPATCH} - || true; \
done
# Target used to check for suspiciously missing changed files.
checkdiff:
$Qcontrib/checkdiff.bash `git merge-base HEAD ${BASE_REF}`
# This target is used during development in order to prevent adding new issues
# to the source code. All warnings are treated as errors in order to block the
# compilation and make the continous integration infrastructure return failure.