Skip to content

Drop JavadocParagraph rule to resolve Spotless conflict#3

Open
khatchad wants to merge 1 commit into
masterfrom
drop-javadocparagraph
Open

Drop JavadocParagraph rule to resolve Spotless conflict#3
khatchad wants to merge 1 commit into
masterfrom
drop-javadocparagraph

Conversation

@khatchad
Copy link
Copy Markdown
Member

@khatchad khatchad commented May 22, 2026

Summary

Remove the JavadocParagraph rule from ponder-checkstyle.xml. It conflicts with Spotless's Eclipse Javadoc formatter, making the conventional <p> Javadoc style unreachable in repos consuming this config.

Why

You write Spotless does Checkstyle (with JavadocParagraph) says
<p> with preceding blank line Strips the blank line "JavadocParagraph: needs blank line before <p>"
<p> without preceding blank line Leaves it alone Same error
Blank Javadoc line as paragraph break (no <p>) Leaves it alone Passes

The first two rows are the standard JDK/Guava/most-Java-libraries form. Forcing the third form across every consumer of this config is friction with no documentary benefit—blank-line-before-<p> is a stylistic micro-preference, not correctness.

Effect

  • Contributors can now use <p> paragraph breaks (still spotless-tolerated).
  • Contributors who prefer blank-line breaks (no <p>) keep that style too.
  • SummaryJavadoc (first sentence ends with a period) stays in place—that one carries real signal.

Cross-Refs

The `JavadocParagraph` Checkstyle rule requires a blank Javadoc line before each `<p>` tag. Spotless's Eclipse Javadoc formatter strips exactly those blank lines on `spotless:apply`. Result: writing the conventional `<p>` Javadoc style (as used by the JDK and most Java libraries) is unreachable in repos consuming this config—every contributor hits the same wall and burns time discovering the workaround.

The rule's signal is low: blank-line-before-`<p>` is a stylistic micro-preference, not a correctness check. Drop it. Blank Javadoc lines as paragraph breaks remain a valid alternative when contributors prefer that style.

Surfaced during the ponder-lab/Hybridize-Functions-Refactoring submodule bump (ponder-lab/Hybridize-Functions-Refactoring#531), where 10 pre-existing `<p>` violations had to be rewritten as blank-line breaks to satisfy both tools.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 22, 2026 17:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the JavadocParagraph Checkstyle rule from the shared Checkstyle configuration to eliminate a known incompatibility with Spotless’s Eclipse Javadoc formatter, allowing the conventional <p> paragraph style in Javadocs.

Changes:

  • Deleted the JavadocParagraph module from ponder-checkstyle.xml.
  • Added an inline XML comment documenting the Spotless conflict and the rationale for disabling the rule.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants