[beast: 35/70] EBEAST: use xmllint to lint HTML files



commit c348788c78fbc27226567bef00f4be2ce2f51aee
Author: Tim Janik <timj gnu org>
Date:   Sun Mar 5 21:45:56 2017 +0100

    EBEAST: use xmllint to lint HTML files
    
    Signed-off-by: Tim Janik <timj gnu org>

 ebeast/Makefile.am |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/ebeast/Makefile.am b/ebeast/Makefile.am
index 5ba8d1c..615f8fd 100644
--- a/ebeast/Makefile.am
+++ b/ebeast/Makefile.am
@@ -22,7 +22,7 @@ clean-local: clean-node_modules
 clean-node_modules: ; rm -rf node_modules/ package.json
 
 # == app ==
-app:   package.json
+app:   package.json xlint-html
        $(Q) $(MAKE) $(AM_MAKEFLAGS) -C v8bse v8bse.node
 
 # == run ==
@@ -36,3 +36,15 @@ run: app
 # the BrowserWindow.darkTheme option. Here, we preselect a commonly installed dark Gtk+2
 # theme if it's present.
 GTK2_DARK = $(shell test -f /usr/share/themes/Ambiance/gtk-2.0/gtkrc && echo 
'GTK2_RC_FILES=/usr/share/themes/Ambiance/gtk-2.0/gtkrc')
+
+# == HTML linting ==
+HTML_LINT_FILES = index.html
+xlint-html: $(HTML_LINT_FILES)
+       $(AM_V_GEN)
+       $(Q) rm -f $@.log $@
+       $(Q) for file in $(HTML_LINT_FILES) ; do \
+         xmllint --html --noout --valid $$file >>$@.log 2>&1 ; \
+       done
+       $(Q) cat $@.log ; test ! -s $@.log
+       $(Q) mv $@.log $@
+MOSTLYCLEANFILES += xlint-html xlint-html.log


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]