2018-03-14 15:15:11 -04:00
|
|
|
module.exports = function addNotYetDocumentedProperty(log, createDocMessage) {
|
2017-01-26 09:03:53 -05:00
|
|
|
return {
|
2018-03-14 15:15:11 -04:00
|
|
|
docTypes: [],
|
|
|
|
$runAfter: ['tags-extracted'],
|
|
|
|
$runBefore: ['processing-docs', 'splitDescription'],
|
|
|
|
$process(docs) {
|
|
|
|
docs.forEach(doc => {
|
|
|
|
if (
|
|
|
|
this.docTypes.indexOf(doc.docType) !== -1 &&
|
|
|
|
!doc.noDescription &&
|
|
|
|
(!doc.description || doc.description.trim().length === 0)
|
|
|
|
) {
|
|
|
|
doc.notYetDocumented = true;
|
2017-01-26 09:03:53 -05:00
|
|
|
log.debug(createDocMessage('Not yet documented', doc));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|