Search for jsduck warnings, fail if found

Change-Id: I21e903375e5c6fbf4cb7c7f5ca52421695618011
This commit is contained in:
Mark Holmquist 2014-02-12 14:18:13 -08:00
parent f5c2d610c0
commit c99d830d25
3 changed files with 12 additions and 4 deletions

View file

@ -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

View file

@ -433,7 +433,7 @@
*
* @param {mw.Title} fileTitle
* @param {number} width width of the thumbnail in pixels
* @return {jQuery.Promise<mw.mmv.model.Image, mw.mmv.model.Thumbnail>}
* @return {jQuery.Promise.<mw.mmv.model.Image, mw.mmv.model.Thumbnail>}
*/
MMVP.fetchImageInfoWithThumbnail = function ( fileTitle, width ) {
return $.when(

View file

@ -27,7 +27,7 @@
/** @property {jQuery} $container The element that contains the UI element. */
this.$container = $container;
/** @property {Object<string, string[]>} eventsRegistered Events that this element has registered with the DOM. */
/** @property {Object.<string, string[]>} eventsRegistered Events that this element has registered with the DOM. */
this.eventsRegistered = {};
}