From e9a10cd2c3df086f468539dce719297cb4918957 Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Tue, 15 Nov 2016 15:22:14 -0600 Subject: [PATCH] Add ratcheting DTD checking to CI --- .travis.yml | 10 ++++++++-- Makefile | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b19f82df..2fa84674 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,12 @@ -script: make all - addons: apt: packages: - xsltproc + - libxml2-utils +before_install: + - wget -O git-ratchet https://github.com/iangrunert/git-ratchet/releases/download/v0.3.1/linux_amd64_git-ratchet + - chmod +x git-ratchet + - git fetch https://github.com/xsf/xeps.git refs/notes/*:refs/notes/* +script: + - make all + - echo "lint,$(xmllint --nonet --noout --noent --loaddtd --valid *.xml 2>&1 | wc -l)" | ./git-ratchet check -v diff --git a/Makefile b/Makefile index 89c60ddd..ecdee8e5 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,9 @@ xep-%.html: $(OUTDIR)/xep-%.html ; dependencies: $(OUTDIR)/prettify.css $(OUTDIR)/prettify.js $(OUTDIR)/xmpp.css ; $(OUTDIR)/%.html: %.xml $(XMLDEPS) dependencies + # TODO: After existing issues are worked out this and the ratcheting CI build + # should be removed and become an error, not just a warning. + xmllint --nonet --noout --noent --loaddtd --valid "$<" || true xsltproc --path $(CURDIR) xep.xsl "$<" > "$@" && echo "Finished building $@" $(OUTDIR)/%.js: %.js