From c99d830d25e98fc552040e07ccc1d944928367d9 Mon Sep 17 00:00:00 2001 From: Mark Holmquist Date: Wed, 12 Feb 2014 14:18:13 -0800 Subject: [PATCH] Search for jsduck warnings, fail if found Change-Id: I21e903375e5c6fbf4cb7c7f5ca52421695618011 --- docs/generate | 12 ++++++++++-- resources/mmv/mmv.js | 2 +- resources/mmv/ui/mmv.ui.js | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/generate b/docs/generate index 265eb329a..d7c2ea2e7 100755 --- a/docs/generate +++ b/docs/generate @@ -4,12 +4,20 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" pushd $SCRIPT_DIR > /dev/null jsduck \ --config=./jsduck-config.json \ - --color --warnings-exit-nonzero \ -- \ `find ../resources/{multilightbox,mmv} -name '*.js'` \ - && echo 'JSDuck execution finished.' + 2>&1 | tee jsduck.log \ + && echo "JSDuck execution finished." RESULT=$? +if [ $RESULT -eq 0 ]; then + grep "^Warning:" jsduck.log > /dev/null + GREPPED=$? + if [ $GREPPED -eq 0 ]; then + RESULT=1 + fi +fi + popd > /dev/null exit $RESULT diff --git a/resources/mmv/mmv.js b/resources/mmv/mmv.js index c48487f15..14339adb4 100755 --- a/resources/mmv/mmv.js +++ b/resources/mmv/mmv.js @@ -433,7 +433,7 @@ * * @param {mw.Title} fileTitle * @param {number} width width of the thumbnail in pixels - * @return {jQuery.Promise} + * @return {jQuery.Promise.} */ MMVP.fetchImageInfoWithThumbnail = function ( fileTitle, width ) { return $.when( diff --git a/resources/mmv/ui/mmv.ui.js b/resources/mmv/ui/mmv.ui.js index e45455995..4c463f10f 100644 --- a/resources/mmv/ui/mmv.ui.js +++ b/resources/mmv/ui/mmv.ui.js @@ -27,7 +27,7 @@ /** @property {jQuery} $container The element that contains the UI element. */ this.$container = $container; - /** @property {Object} eventsRegistered Events that this element has registered with the DOM. */ + /** @property {Object.} eventsRegistered Events that this element has registered with the DOM. */ this.eventsRegistered = {}; }