Enforce a standard code format in the build with Spotless
Maintainers usually reply within 1 day
@dashorst is already working on this.
Since Nov 8, 2026.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- java
- Domain
- build-system, tooling
Research direction
Start by reading the root pom, the existing formatter profiles at wicket-eclipse-settings/files/org.eclipse.jdt.core.prefs and wicket-core/EclipseCodeFormat.xml, and the contributor documentation. The proposal calls for formatting the whole tree, comparing diff sizes per module, integrating Spotless into Maven and CI, and aligning IDE profiles. Done means the stated acceptance criteria are met, including a formatting-only commit and its hash in .git-blame-ignore-revs.
Written by the indexing model from the issue text.
Description
Wicket has a code style (tabs, braces on their own line, 100 columns), but nothing in the build applies or checks it. The Eclipse formatter settings exist in two places: wicket-eclipse-settings/files/org.eclipse.jdt.core.prefs, released separately as the wicket-eclipse-settings artifact (version 4) and pulled in by the root pom, and wicket-core/EclipseCodeFormat.xml, an older exported profile. IntelliJ users have no profile at all. As a result formatting drifts with every contributor's IDE, reviews pick up whitespace noise, and contributors — human or tool-assisted — have no way to check their change matches the house style before submitting it.
Proposal
Enforce a single formatting standard in the Maven build with Spotless (or a comparable formatter plugin if it turns out to fit better), with the formatter profile derived from the code as it is today, so that the first spotless:apply changes as little as possible.
- Distill the profile from the code base. Start from the existing Eclipse settings, run the Eclipse JDT formatter (which Spotless can drive directly with an Eclipse XML profile) over the whole tree, and tune the settings that cause the largest diffs until the remaining changes are genuine inconsistencies rather than profile mismatches. Report the resulting diff size per module so the trade-offs are visible.
- One source of truth. Keep a single canonical profile in the repository, used by Spotless. Retire or regenerate
wicket-core/EclipseCodeFormat.xmland decide what happens to thewicket-eclipse-settingsartifact (regenerate from the canonical profile, or drop it). - IDE profiles. Ship an Eclipse formatter profile and an IntelliJ code style scheme (IntelliJ can import the Eclipse XML, or use the Eclipse Code Formatter plugin; a native
.ideacode style may still be preferable) that produce the same output as the build. Consider an.editorconfigfor the basics (indentation, line endings, final newline) for other editors. - Build integration. Run
spotless:checkin the regular build (and therefore in CI), withspotless:applydocumented for contributors. UseratchetFromor an equivalent if we want to enforce only on changed files before the bulk reformat lands. - Scope beyond Java. Decide whether to also cover import order, the license header (now checked by apache-rat only for presence), poms (sortpom is already enforced by the pedantic pom enforcer, so avoid two tools fighting over the same file), and JavaScript/CSS/markup. Java first is fine.
- Bulk reformat. Apply the formatter in a single, formatting-only commit and add its hash to
.git-blame-ignore-revssogit blamestays useful. Do this onmaster; whether and when to do the same onwicket-11.xandwicket-10.xis a separate decision, since reformatting maintenance branches makes cherry-picks frommasterharder until they are reformatted too. - Documentation. Update the contributor documentation (README / AGENTS.md / user guide) to describe the style, the IDE setup and the
spotless:applystep.
Acceptance criteria
mvn verifyfails on misformatted Java sources, with a message pointing atmvn spotless:apply.- The formatter profile lives in the repository and the Eclipse and IntelliJ profiles produce output identical to the build on the whole tree.
- The bulk reformat commit is formatting-only and listed in
.git-blame-ignore-revs. - The size of that reformat diff is reported in the pull request, together with the settings chosen to keep it small.
- Dominant language
- Java
- Stars
- 800
- Forks
- 437
- Avg merge
- 21h 36m
- Merged PRs (30d)
- 167
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from apache/wicket
-
PropertyResolver fails on JDK classes with a non-public field named like the propertyPossibly taken @vaibhavgupta443 claimed this today. Opengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
apache/wicket#1991 · 1 comment ·
Maintainers usually reply within 1 day
-
Stop the autocomplete from accumulating request parameters while typingPossibly taken @aryankalantri claimed this today. Opengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
apache/wicket#1947 · 2 comments ·
Maintainers usually reply within 1 day
-
Validate the report-uri value given to CSPHeaderConfiguration#reportBackPossibly taken @AzizOuertani claimed this 3 days ago. Opengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
apache/wicket#1946 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
Maintainers usually reply within 1 day
Similar issues
-
account assessment course feature lecture
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
app:learninggoalhub enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100