Re: RFR: 8337111: Bad HTML checker for generated documentation [v4]

2024-12-20 Thread Nizar Benalla
On Thu, 19 Dec 2024 15:35:14 GMT, Hannes Wallnöfer  wrote:

>> Nizar Benalla has updated the pull request incrementally with two additional 
>> commits since the last revision:
>> 
>>  - Rename method and usage to be more concise
>>  - make regex more rebust in case of single quote in legacy doctype
>
> test/docs/jdk/javadoc/doccheck/ExtLinksJdk.txt line 1:
> 
>> 1: http://cldr.unicode.org/
> 
> One thing that would be nice to have (and easy to implement) is to treat 
> lines starting with `#` as comments and add a few lines at the top of the 
> file describing the purpose of this file and how to add new links.

Fixed, thanks!

-

PR Review Comment: https://git.openjdk.org/jdk/pull/21879#discussion_r1894041781


Re: RFR: 8337111: Bad HTML checker for generated documentation [v4]

2024-12-20 Thread Nizar Benalla
On Sun, 15 Dec 2024 21:26:50 GMT, Nizar Benalla  wrote:

>> Doccheck's human-generated reports are great at previewing a "chessboard" of 
>> results. Giving reader a quick glimpse at the quality/health of the 
>> documentation. But these tests needed to be automated and they didn't easily 
>> translate to something that can be integrated into a CI.
>> 
>> This PR includes an HTML and internal link test on `api/java.base` and a 
>> BadChars and Doctype test on the entire generated documentation bundle.
>> 
>> Here is an example of the output after running all tests on `api/java.base`
>> 
>> Note: There is an active PR to fix the broken anchors left in `java.base` so 
>> this is not a blocker.
>> 
>> 
>> 
>> STDOUT:
>> STDERR:
>> test: test
>> Tidy found errors in the generated HTML
>> /Users/nizarbenalla/Work/jdk-repos/jdk1/build/macosx-aarch64/images/docs/api/java.base/java/lang/Class.html:323:87:
>>  Warning:  anchor "nest" already defined
>> Tidy output end.
>> 
>> 
>> api/java.base/java/util/concurrent/StructuredTaskScope.ShutdownOnFailure.html:245:
>>  id not found: 
>> api/java.base/java/util/concurrent/StructuredTaskScope.ShutdownOnFailure.html#TreeStructure
>> api/java.base/java/util/concurrent/StructuredTaskScope.ShutdownOnSuccess.html:242:
>>  id not found: 
>> api/java.base/java/util/concurrent/StructuredTaskScope.ShutdownOnSuccess.html#TreeStructure
>> api/java.base/java/lang/Class.html:323: name already declared: nest
>> api/java.base/java/lang/Module.html:291: id not found: 
>> api/java.base/java/lang/foreign/package-summary.html#restricted
>> api/java.base/java/lang/Module.html:434: id not found: 
>> api/java.base/java/lang/foreign/package-summary.html#restricted
>> api/java.base/java/lang/foreign/MemorySegment.html:725: id not found: 
>> api/java.base/java/lang/foreign/package-summary.html#restricted
>> 
>> Link Checker Report
>> Checked 3446 files.
>> Found 445059 references to 48205 anchors in 5770 files and 64 other URIs.
>>  1 duplicate ids
>>  3 missing ids
>> 
>> Hosts
>> 20 docs.oracle.com
>>  1 tools.ietf.org
>>  1 www.ietf.org
>>  1 jcp.org
>>  4 www.rfc-editor.org
>>  7 unicode.org
>> 10 www.unicode.org
>> 20 www.w3.org
>> Exception running test test: java.lang.Exception: One or more HTML checkers 
>> failed: [java.lang.RuntimeException: Tidy found errors in the generated 
>> HTML, java.lang.RuntimeException: LinkChecker encountered errors. Duplicate 
>> IDs: 1, Missing IDs: 3, Missing Files: 0, Bad Schemes: 0]
>> java.lang.Exception: One or more HTML checkers failed: 
>> [java.lang.RuntimeException: Tidy found errors in the generated HTML, 
>> java.lang.Ru...
>
> Nizar Benalla has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - Rename method and usage to be more concise
>  - make regex more rebust in case of single quote in legacy doctype

I forgot to link this issue.

-

PR Comment: https://git.openjdk.org/jdk/pull/21879#issuecomment-2556849935


Re: RFR: 8337111: Bad HTML checker for generated documentation [v4]

2024-12-19 Thread Hannes Wallnöfer
On Sun, 15 Dec 2024 21:26:50 GMT, Nizar Benalla  wrote:

>> Doccheck's human-generated reports are great at previewing a "chessboard" of 
>> results. Giving reader a quick glimpse at the quality/health of the 
>> documentation. But these tests needed to be automated and they didn't easily 
>> translate to something that can be integrated into a CI.
>> 
>> This PR includes an HTML and internal link test on `api/java.base` and a 
>> BadChars and Doctype test on the entire generated documentation bundle.
>> 
>> Here is an example of the output after running all tests on `api/java.base`
>> 
>> Note: There is an active PR to fix the broken anchors left in `java.base` so 
>> this is not a blocker.
>> 
>> 
>> 
>> STDOUT:
>> STDERR:
>> test: test
>> Tidy found errors in the generated HTML
>> /Users/nizarbenalla/Work/jdk-repos/jdk1/build/macosx-aarch64/images/docs/api/java.base/java/lang/Class.html:323:87:
>>  Warning:  anchor "nest" already defined
>> Tidy output end.
>> 
>> 
>> api/java.base/java/util/concurrent/StructuredTaskScope.ShutdownOnFailure.html:245:
>>  id not found: 
>> api/java.base/java/util/concurrent/StructuredTaskScope.ShutdownOnFailure.html#TreeStructure
>> api/java.base/java/util/concurrent/StructuredTaskScope.ShutdownOnSuccess.html:242:
>>  id not found: 
>> api/java.base/java/util/concurrent/StructuredTaskScope.ShutdownOnSuccess.html#TreeStructure
>> api/java.base/java/lang/Class.html:323: name already declared: nest
>> api/java.base/java/lang/Module.html:291: id not found: 
>> api/java.base/java/lang/foreign/package-summary.html#restricted
>> api/java.base/java/lang/Module.html:434: id not found: 
>> api/java.base/java/lang/foreign/package-summary.html#restricted
>> api/java.base/java/lang/foreign/MemorySegment.html:725: id not found: 
>> api/java.base/java/lang/foreign/package-summary.html#restricted
>> 
>> Link Checker Report
>> Checked 3446 files.
>> Found 445059 references to 48205 anchors in 5770 files and 64 other URIs.
>>  1 duplicate ids
>>  3 missing ids
>> 
>> Hosts
>> 20 docs.oracle.com
>>  1 tools.ietf.org
>>  1 www.ietf.org
>>  1 jcp.org
>>  4 www.rfc-editor.org
>>  7 unicode.org
>> 10 www.unicode.org
>> 20 www.w3.org
>> Exception running test test: java.lang.Exception: One or more HTML checkers 
>> failed: [java.lang.RuntimeException: Tidy found errors in the generated 
>> HTML, java.lang.RuntimeException: LinkChecker encountered errors. Duplicate 
>> IDs: 1, Missing IDs: 3, Missing Files: 0, Bad Schemes: 0]
>> java.lang.Exception: One or more HTML checkers failed: 
>> [java.lang.RuntimeException: Tidy found errors in the generated HTML, 
>> java.lang.Ru...
>
> Nizar Benalla has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - Rename method and usage to be more concise
>  - make regex more rebust in case of single quote in legacy doctype

test/docs/jdk/javadoc/doccheck/ExtLinksJdk.txt line 1:

> 1: http://cldr.unicode.org/

One thing that would be nice to have (and easy to implement) is to treat lines 
starting with `#` as comments and add a few lines at the top of the file 
describing the purpose of this file and how to add new links.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/21879#discussion_r1892513087


Re: RFR: 8337111: Bad HTML checker for generated documentation [v4]

2024-12-15 Thread Nizar Benalla
> Doccheck's human-generated reports are great at previewing a "chessboard" of 
> results. Giving reader a quick glimpse at the quality/health of the 
> documentation. But these tests needed to be automated and they didn't easily 
> translate to something that can be integrated into a CI.
> 
> This PR includes an HTML and internal link test on `api/java.base` and a 
> BadChars and Doctype test on the entire generated documentation bundle.
> 
> Here is an example of the output after running all tests on `api/java.base`
> 
> Note: There is an active PR to fix the broken anchors left in `java.base` so 
> this is not a blocker.
> 
> 
> 
> STDOUT:
> STDERR:
> test: test
> Tidy found errors in the generated HTML
> /Users/nizarbenalla/Work/jdk-repos/jdk1/build/macosx-aarch64/images/docs/api/java.base/java/lang/Class.html:323:87:
>  Warning:  anchor "nest" already defined
> Tidy output end.
> 
> 
> api/java.base/java/util/concurrent/StructuredTaskScope.ShutdownOnFailure.html:245:
>  id not found: 
> api/java.base/java/util/concurrent/StructuredTaskScope.ShutdownOnFailure.html#TreeStructure
> api/java.base/java/util/concurrent/StructuredTaskScope.ShutdownOnSuccess.html:242:
>  id not found: 
> api/java.base/java/util/concurrent/StructuredTaskScope.ShutdownOnSuccess.html#TreeStructure
> api/java.base/java/lang/Class.html:323: name already declared: nest
> api/java.base/java/lang/Module.html:291: id not found: 
> api/java.base/java/lang/foreign/package-summary.html#restricted
> api/java.base/java/lang/Module.html:434: id not found: 
> api/java.base/java/lang/foreign/package-summary.html#restricted
> api/java.base/java/lang/foreign/MemorySegment.html:725: id not found: 
> api/java.base/java/lang/foreign/package-summary.html#restricted
> 
> Link Checker Report
> Checked 3446 files.
> Found 445059 references to 48205 anchors in 5770 files and 64 other URIs.
>  1 duplicate ids
>  3 missing ids
> 
> Hosts
> 20 docs.oracle.com
>  1 tools.ietf.org
>  1 www.ietf.org
>  1 jcp.org
>  4 www.rfc-editor.org
>  7 unicode.org
> 10 www.unicode.org
> 20 www.w3.org
> Exception running test test: java.lang.Exception: One or more HTML checkers 
> failed: [java.lang.RuntimeException: Tidy found errors in the generated HTML, 
> java.lang.RuntimeException: LinkChecker encountered errors. Duplicate IDs: 1, 
> Missing IDs: 3, Missing Files: 0, Bad Schemes: 0]
> java.lang.Exception: One or more HTML checkers failed: 
> [java.lang.RuntimeException: Tidy found errors in the generated HTML, 
> java.lang.RuntimeException: LinkChecker encountered errors. Duplicate IDs: 1, 
> Missing IDs: 3, Mi...

Nizar Benalla has updated the pull request incrementally with two additional 
commits since the last revision:

 - Rename method and usage to be more concise
 - make regex more rebust in case of single quote in legacy doctype

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/21879/files
  - new: https://git.openjdk.org/jdk/pull/21879/files/a5efb313..964ca5e2

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=21879&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=21879&range=02-03

  Stats: 11 lines in 4 files changed: 0 ins; 0 del; 11 mod
  Patch: https://git.openjdk.org/jdk/pull/21879.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/21879/head:pull/21879

PR: https://git.openjdk.org/jdk/pull/21879


Re: RFR: 8337111: Bad HTML checker for generated documentation [v4]

2024-09-13 Thread Nizar Benalla
On Wed, 4 Sep 2024 18:39:15 GMT, Nizar Benalla  wrote:

>> Can I please get a review for this PR that adds 4 new html "Checkers" for 
>> the generated documentation.
>> More details are in the JBS issues
>> 
>> These tests were mostly inspired /converted from the existing 
>> [Doccheck](https://github.com/openjdk/doccheck).
>
> Nizar Benalla has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   make test run with executors by default

Closing this for now, I need time to adapt parts of this

-

PR Comment: https://git.openjdk.org/jdk/pull/20711#issuecomment-2349049489


Re: RFR: 8337111: Bad HTML checker for generated documentation [v4]

2024-09-04 Thread Nizar Benalla
On Wed, 4 Sep 2024 18:39:15 GMT, Nizar Benalla  wrote:

>> Can I please get a review for this PR that adds 4 new html "Checkers" for 
>> the generated documentation.
>> More details are in the JBS issues
>> 
>> These tests were mostly inspired /converted from the existing 
>> [Doccheck](https://github.com/openjdk/doccheck).
>
> Nizar Benalla has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   make test run with executors by default

I tried to address some of the review comments, I now use `TestRunner`.
I've renamed the `tools` directory to `doccheckutils` to avoid any naming 
conflicts.
There are now two modes of running the test, one with executors and one 
sequentially, you can pass a `doccheck.runParallel` command line option to test 
and the default value is true.

-

PR Comment: https://git.openjdk.org/jdk/pull/20711#issuecomment-2329748255


Re: RFR: 8337111: Bad HTML checker for generated documentation [v4]

2024-09-04 Thread Nizar Benalla
> Can I please get a review for this PR that adds 4 new html "Checkers" for the 
> generated documentation.
> More details are in the JBS issues
> 
> These tests were mostly inspired /converted from the existing 
> [Doccheck](https://github.com/openjdk/doccheck).

Nizar Benalla has updated the pull request incrementally with one additional 
commit since the last revision:

  make test run with executors by default

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/20711/files
  - new: https://git.openjdk.org/jdk/pull/20711/files/c6d60f95..19d07811

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=20711&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=20711&range=02-03

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/20711.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20711/head:pull/20711

PR: https://git.openjdk.org/jdk/pull/20711