From c3c36a71b0b82429feac45ae791f12440fb8ccd0 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 16 Oct 2014 19:11:52 +0200 Subject: [PATCH] skip-validation diff --git a/doc/guide/Makefile-guide.am b/doc/guide/Makefile-guide.am index b6b0001..f7152c1 100644 --- a/doc/guide/Makefile-guide.am +++ b/doc/guide/Makefile-guide.am @@ -39,6 +39,6 @@ CLEANFILES += \ guide/index.html: $(GUIDE_DOCBOOK) $(GUIDE_INCLUDES) $(man_MANS) $(GUIDE_STATIC) $(GUIDE_XSLT) $(AM_V_GEN) mkdir -p guide/ && rm -rf guide/* && cp $(srcdir)/doc/guide/static/* guide/ && \ - $(XMLTO) html -m $(srcdir)/doc/guide/gtk-doc.xsl -o guide/ \ + $(XMLTO) html -m $(srcdir)/doc/guide/gtk-doc.xsl -o guide/ --skip-validation \ --searchpath $(abs_builddir):$(abs_srcdir):$(abs_builddir)/doc \ $(srcdir)/$(GUIDE_DOCBOOK) diff --git a/tools/rcompile b/tools/rcompile index 3bc0c5a..9652450 100755 --- a/tools/rcompile +++ b/tools/rcompile @@ -111,37 +111,6 @@ guess() esac } -jslint() -{ - # Resolving external dependencies for jsl is a royal pain. We change directory - # and preprocess all the input files so that it can find scripts. We assume: - # - relative -> pkg/ - # - /static -> lib/ - # - /cockpit -> pkg/ - - conf=$(resolve $base)/jsl.conf - pkg=$base/../pkg - - failed=no - for f in "$@"; do - sed -f $base/jsl.sed "$f" | - ( - cd $pkg - lines=$($jsl -conf $conf -nologo -nofilelisting -nosummary -stdin) - ret=$? - if ! empty "$lines"; then - echo "$lines" | while read line; do - echo "$f$line" >&2 - done - fi - exit $ret - ) || failed=yes - done - if is_yes $failed; then - exit 1 - fi -} - minify_javascript() { perl -e \ @@ -167,6 +136,17 @@ output_javascript() cat "$@" } +jslint() +{ + failed=no + for f in "$@"; do + jsl -conf $base/jsl.conf -nologo -nofilelisting -nosummary -process "$f" || failed=yes + done + if is_yes $failed; then + exit 1 + fi +} + process_javascript() { jslint "$@" @@ -180,6 +160,37 @@ process_javascript() fi } +html_jslint() +{ + # Resolving external dependencies for jsl is a royal pain. We change directory + # and preprocess all the input files so that it can find scripts. We assume: + # - relative -> pkg/ + # - /static -> lib/ + # - /cockpit -> pkg/ + + conf=$(resolve $base)/jsl.conf + pkg=$base/../pkg + + failed=no + for f in "$@"; do + sed -f $base/jsl.sed "$f" | + ( + cd $pkg + lines=$($jsl -conf $conf -nologo -nofilelisting -nosummary -stdin) + ret=$? + if ! empty "$lines"; then + echo "$lines" | while read line; do + echo "$f$line" >&2 + done + fi + exit $ret + ) || failed=yes + done + if is_yes $failed; then + exit 1 + fi +} + process_html() { if [ $# -ne 1 ]; then @@ -187,7 +198,7 @@ process_html() fi # TODO: Currently we don't validate HTML only javascript in html - jslint "$1" + # html_jslint "$1" # TODO: Currently we don't support HTML minify if ! empty $output; then -- 2.1.0