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 @file tag is followed by @class tag #427

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

YUIDoc can crash when @file tag is followed by @class tag #427

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:

/**
 * @file test.js
 * @class The foo class.
 */
function foo() { return 'bar'; }

YUIDoc crashs with this stacktrace:

info: Starting [email protected] using [email protected] with [email protected]
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: .
error: --------------------------------------------------------------------------
error: An uncaught YUIDoc error has occurred, stack trace given below
error: --------------------------------------------------------------------------
error: TypeError: Cannot read property 'classes' of undefined
    at null.<anonymous> (/usr/lib/node_modules/yuidocjs/lib/docparser.js:1499:38)
    at Function.O.each (/usr/lib/node_modules/yuidocjs/node_modules/yui/yui-nodejs/yui-nodejs.js:3309:16)
    at a (/usr/lib/node_modules/yuidocjs/node_modules/yui/oop/oop-min.js:1:319)
    at e.each (/usr/lib/node_modules/yuidocjs/node_modules/yui/oop/oop-min.js:1:1249)
    at Y.extend.transform (/usr/lib/node_modules/yuidocjs/lib/docparser.js:1483:15)
    at Y.extend.parse (/usr/lib/node_modules/yuidocjs/lib/docparser.js:1573:25)
    at Object.Y.YUIDoc.run (/usr/lib/node_modules/yuidocjs/lib/yuidoc.js:399:16)
    at Object.<anonymous> (/usr/lib/node_modules/yuidocjs/lib/cli.js:36:40)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
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 YUIDoc do not crash with the following file content (tags have been reversed):

/**
 * @class The foo class.
 * @file test.js
 */
function foo() { return 'bar'; }
@roipoussiere roipoussiere changed the title YUIDoc can crash when @class tag is empty YUIDoc can crash when @file tag is followed by @class tag 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