openrewrite / openrewrite/rewrite-migrate-java
JDK 13+ : Headings should start with `h2` and `h4`
Open
Nobody has claimed this yet.
recipe
- Dominant language
- Java
- Stars
- 156
- Forks
- 130
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 21
Description
Headings in documentation comments for all modules, packages and types (including nested types) should begin at <h2>.
Headings in members should begin at <h4>.
Currently, this leads to the following failure:
MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1
[ERROR] /MyClass.java:24: error: unexpected heading used: <H1>, compared to implicit preceding heading: <H1>
[ERROR] * <h1>My heading</h1>
Changing it to <h2> is enough to fix it
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Maven Javadoc failure described for JDK 13+ and read JDK-8220379 for the heading rules. Locate the recipe entry point and tests for migrating Java documentation; done means module, package, type, and nested-type headings begin at h2, member headings begin at h4, and Javadoc generation succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100