#467: generate summary XML in docs command#951
Conversation
|
@nacNAC333 Thanks for your contribution! Unfortunately, we can't merge it without tests. Every feature we add and every bug we fix must be accompanied by at least one new test that confirms that the code was not working before. Without such a test, how can we know that what you commit actually works? |
Favixx
left a comment
There was a problem hiding this comment.
docs command crashes — rel is not defined
Running the docs test suite on this branch (test/commands/test_docs.js) fails: line 178 calls rel(summary), but rel is not defined or imported anywhere in src/commands/docs.js.
Error generating documentation: ReferenceError: rel is not defined
at src/commands/docs.js:178:15
at elapsed (src/elapsed.js:23:10)
at module.exports [as docs] (src/commands/docs.js:124:10)
The exception is caught at line 149, so execution aborts before summary.xml is written — the feature never produces output, and the generates HTML files for files and packages test fails.
Suggested follow-ups:
- Replace
rel(summary)with something defined, e.g.path.relative(output, summary). - The nested
O(packages × xmirs)loop re-derives data thatpackages_infoalready groups — consider reusing it instead of recomputingpath.relativeper xmir per package. - Please add a test asserting
summary.xmlis created with the expectedpackages/objectscounts — none exists currently, which is why this regression slipped through.
553861a to
b371f0f
Compare
|
@yegor256 Test added in the second commit — |
Fixes #467
Adds summary XML file generation to the
docscommand. After generating HTML documentation, the command now also produces asummary.xmlfile in<eodoc>format listing all packages and objects.Changes:
xmlEscape()helper for safe XML entity escapingsummary.xmlwith<eodoc>root,<package>and<object>childrenpackagesandobjectscount attributes on root element