Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YUIDoc can crash when @extends tag is empty #426

Open
roipoussiere opened this issue Oct 28, 2016 · 0 comments
Open

YUIDoc can crash when @extends tag is empty #426

roipoussiere opened this issue Oct 28, 2016 · 0 comments

Comments

@roipoussiere
Copy link

roipoussiere commented Oct 28, 2016

When building the documentation from a folder containing only this js file:

/**
 * @class The foo class aims to crash YUIDoc.
 * @extends 
 */
function foo() {return 'bar';}

YUIDoc crashs with this stacktrace:

info: Starting YUIDoc@0.10.2 using YUI@3.18.1 with NodeJS@4.4.7
info: Scanning for yuidoc.json file.
info: Starting YUIDoc with the following options:
info: {"port":3000,"nocode":false,"paths":["."],"outdir":"./out"}
info: YUIDoc Starting from: .
warn: Found out dir, deleting: ./out
info: Making out dir: ./out
info: Parsed 8 files in 0.031 seconds
info: Building..
info: Compiling Templates
info: Making default directories: classes,elements,modules,files
info: Copying Assets
info: Rendering and writing 0 modules pages.
info: Finished writing module files
info: Rendering and writing 1 class pages.
info: Loading theme from /usr/lib/node_modules/yuidocjs/themes/default/theme.json
error: --------------------------------------------------------------------------
error: An uncaught YUIDoc error has occurred, stack trace given below
error: --------------------------------------------------------------------------
error: TypeError: item.indexOf is not a function
    at Object.<anonymous> (/usr/lib/node_modules/yuidocjs/lib/builder.js:75:22)
    at Object.eval (eval at <anonymous> (/usr/lib/node_modules/yuidocjs/node_modules/yui/handlebars-compiler/handlebars-compiler-min.js:11:641), <anonymous>:4:82)
    at Object.s [as fn] (/usr/lib/node_modules/yuidocjs/node_modules/yui/handlebars-base/handlebars-base-min.js:7:707)
    at Object.<anonymous> (/usr/lib/node_modules/yuidocjs/node_modules/yui/handlebars-base/handlebars-base-min.js:6:2855)
    at Object.eval (eval at <anonymous> (/usr/lib/node_modules/yuidocjs/node_modules/yui/handlebars-compiler/handlebars-compiler-min.js:11:641), <anonymous>:9:26)
    at Object.o (/usr/lib/node_modules/yuidocjs/node_modules/yui/handlebars-base/handlebars-base-min.js:7:310)
    at Object.o [as classes] (/usr/lib/node_modules/yuidocjs/node_modules/yui/handlebars-compiler/handlebars-compiler-min.js:9:5480)
    at Object.i [as invokePartial] (/usr/lib/node_modules/yuidocjs/node_modules/yui/handlebars-base/handlebars-base-min.js:6:5314)
    at Object.eval (eval at <anonymous> (/usr/lib/node_modules/yuidocjs/node_modules/yui/handlebars-compiler/handlebars-compiler-min.js:11:641), <anonymous>:4:17)
    at Object.o (/usr/lib/node_modules/yuidocjs/node_modules/yui/handlebars-base/handlebars-base-min.js:7:310)
error: --------------------------------------------------------------------------
error: Node.js version: v4.4.7
error: YUI version: 3.18.1
error: YUIDoc version: 0.10.2
error: Please file all tickets here: http://github.com/yui/yuidoc/issues
error: --------------------------------------------------------------------------

Note that the documentation is not correct because @extends tag is empty, but YUIDoc should only prints a warning.

@roipoussiere roipoussiere changed the title YUIDoc crashs when @extends tag is empty YUIDoc can crash when @extends tag is empty Oct 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant