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

Extend getXdocsFilePaths to gather .xml.vm files and get rid of getAllXdocFilePaths #13389

Closed
stoyanK7 opened this issue Jul 12, 2023 · 1 comment · Fixed by #13395
Closed

Comments

@stoyanK7
Copy link
Collaborator

In #13362 we add new method in XdocUtil - getAllXdocFilePaths. The method is almost identical to getXdocsFilePaths except that it also gets .xml.vm files.

If we extend getXdocsFilePaths to include .xml.vm files, 3 tests break:

    public static Set<Path> getXdocsFilePaths() throws IOException {
        final Path directory = Paths.get(DIRECTORY_PATH);
        try (Stream<Path> stream = Files.find(directory, Integer.MAX_VALUE,
-                (path, attr) -> attr.isRegularFile() && path.toString().endsWith(".xml"))) {
+                (path, attr) -> {
+                   return attr.isRegularFile()
+                            && path.toString().endsWith(".xml")
+                            || path.toString().endsWith(".xml.vm");
+                })) {
            return stream.collect(Collectors.toSet());
        }
    }
[ERROR] Failures: 
[ERROR]   XdocsMobileWrapperTest.testAllCheckSectionMobileWrapper:67->iterateNode:80 writingjavadocchecks.xml.vm/HTML Code In Javadoc Comments: Tag 'table' in 'section' needs a wrapping <span> or <div> with the class 'wrapper'.
expected any of: [div, span]
but was        : section
[ERROR]   XdocsPagesTest.testAllSubSections:399 index.xml.vm sub-section Inactive / Old Tools for section Related Tools must match
expected: Related_Tools_Inactive_/_Old_Tools
but was : Related_Tools_Inactive_Old_Tools
[ERROR] Errors: 
[ERROR]   XdocsPagesTest.testAllXmlExamples:431->isValidCheckstyleXml:507 Checkstyle writingjavadocchecks.xml.vm has invalid Checkstyle xml (unable to parse configuration stream - Element type "audio" must be declared.:5:8): <audio><source src="horse.ogg" type="audio/ogg"/></audio>
[INFO] 
[ERROR] Tests run: 4202, Failures: 2, Errors: 1, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants