documentationjs / documentationjs/documentation
empty @inner tag (in wrong place?) crashes very ugly
- Lingua principale
- JavaScript
- Stelle
- 5.8k
- Fork
- 481
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I developed an AMD module that uses an internal function. I thought it would be nice to tag the documentation of that function with the @inner tag (though it might not be entirely valid). That crashes documentationjs without clean error. Adding some text on the same line after @inner removes the crash.
Code sample:
```
define([], function() {
DoSomething();
/**
* My Object of Documentation Desire
* @exports myObject
*/
var myObject = {};
return myObject;
/**
* DoSomething - Might do something
*
* @return {boolean} Did we really do anything?
* @inner
*/
function DoSomething() {
return false;
}
});
```
Error Message:
```
documentation build src/documentationbug.js -f html -o docs2/
/usr/local/lib/node_modules/documentation/lib/commands/build.js:66
throw err;
^
TypeError: Cannot convert undefined or null to object
at hasOwnProperty (native)
at /usr/local/lib/node_modules/documentation/lib/hierarchy.js:68:27
at Array.forEach (native)
at module.exports (/usr/local/lib/node_modules/documentation/lib/hierarchy.js:38:12)
at buildSync (/usr/local/lib/node_modules/documentation/index.js:221:5)
at /usr/local/lib/node_modules/documentation/index.js:147:16
at /usr/local/lib/node_modules/documentation/lib/input/dependency.js:63:5
at ConcatStream. (/usr/local/lib/node_modules/documentation/node_modules/concat-stream/index.js:36:43)
at emitNone (events.js:72:20)
at ConcatStream.emit (events.js:166:7)
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Riproduci il malfunzionamento con il comando di build della documentazione fornito e l’esempio AMD. Inizia esaminando lib/hierarchy.js intorno alla riga 68, quindi traccia il percorso con cui build.js vi arriva; confronta la gestione del tag @inner vuoto con quella di un tag contenente testo. Il lavoro è completato quando l’esempio non va più in crash con un TypeError non gestito e il comportamento risultante è coperto da un test appropriato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- documentation, tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100