![]() |
Proposed Jenkins test to detect (some) corrupt documentation - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: Proposed Jenkins test to detect (some) corrupt documentation (/showthread.php?tid=377476) |
Proposed Jenkins test to detect (some) corrupt documentation - DeltaMikeCharlie - 2024-05-10 Excuse me if this has been proposed before. I assume that it is well known that when the Doxygen tags contain syntax errors, the resulting documentation can be malformed (I have been responsible for this on more than 1 occasion). I have noticed that this malformation usually manifests as Doxygen tags being visible in the final HTML code. ![]() I’d like to suggest that part of the PR pre-flight processes on GitHub includes building the documentation and then running a simple: Code: grep -r -i "\\\table_row"|wc -l If the result is not equal to zero, then the documentation may need to be reviewed manually. Something like this: Code: grep -r -i "\\\table_row"|awk '{print $1}' Can identify the HTML file name, but not the source code from which it originated. I’m sure that malformed documentation can result from other Doxygen syntax errors and as they are discovered they could be added to the test. RE: Proposed Jenkins test to detect (some) corrupt documentation - DeltaMikeCharlie - 2024-05-11 I’m sure that there is considerable room for refinement here, however, this: Code: grep -r -i "\\\table_row" .|gawk -F"<code>" '{print $2}'|gawk -F"</code>" '{print $1}' Turned this: Code: ./d0/d3e/page__list_of_built_in_functions.html: <tr><td class="paramdir">[in]</td><td class="paramname">param</td><td>"restart" to restart from resume point (optional) \table_row2_l{ <b><code>PlayerControl(control[\,param])</code></b> , Allows control of music and videos. <br /> Into this: Code: PlayerControl(control[\,param]) It may not give the exact source file name and location, but it gives a good hint regarding the general proximity in which to start looking. The results could be added to a GitHub comment with a suggestion that the PR owner review their code. RE: Proposed Jenkins test to detect (some) corrupt documentation - DeltaMikeCharlie - 2024-05-12 (2024-05-11, 06:17)DeltaMikeCharlie Wrote: Taking the output of the previous post, it should also be possible to search the DIFF of the PR for a match, failing that, entire source tree could also be searched. This could help identify the source file involved. |