Repository navigation
Compatibility with Checkstyle 10.22 #433
Copy link
Copy link
Closed
Labels
Milestone
Description
Activity
We can't upgrade to Checkstyle 10 as it requires Java 11 and Spring Java Format needs to support projects with a Java 8 baseline. Instead, we'll have to look at doing something similar to #395 and somehow tolerate the breaking change in Checkstyle 10.22.
For future reference, the current failure looks like this:
Caused by: java.lang.IllegalStateException: cannot initialize module com.puppycrawl.tools.checkstyle.TreeWalker - cannot initialize module com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck - Property 'scope' does not exist, please check the documentation at io.spring.javaformat.checkstyle.SpringConfigurationLoader.createModule(SpringConfigurationLoader.java:87) at io.spring.javaformat.checkstyle.SpringConfigurationLoader.load(SpringConfigurationLoader.java:72) at io.spring.javaformat.checkstyle.SpringConfigurationLoader.load(SpringConfigurationLoader.java:58) at io.spring.javaformat.checkstyle.SpringChecks.finishLocalSetup(SpringChecks.java:103) at com.puppycrawl.tools.checkstyle.AbstractAutomaticBean.configure(AbstractAutomaticBean.java:207) at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:479) at com.puppycrawl.tools.checkstyle.AbstractAutomaticBean.configure(AbstractAutomaticBean.java:211) at com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask.createRootModule(CheckstyleAntTask.java:402) at com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask.realExecute(CheckstyleAntTask.java:298) at com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask.execute(CheckstyleAntTask.java:280) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99) ... 37 more Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck - Property 'scope' does not exist, please check the documentation at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:160) at com.puppycrawl.tools.checkstyle.AbstractAutomaticBean.configure(AbstractAutomaticBean.java:211) at io.spring.javaformat.checkstyle.SpringConfigurationLoader.initialize(SpringConfigurationLoader.java:96) at io.spring.javaformat.checkstyle.SpringConfigurationLoader.createModule(SpringConfigurationLoader.java:83) ... 51 more Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Property 'scope' does not exist, please check the documentation at com.puppycrawl.tools.checkstyle.AbstractAutomaticBean.tryCopyProperty(AbstractAutomaticBean.java:237) at com.puppycrawl.tools.checkstyle.AbstractAutomaticBean.configure(AbstractAutomaticBean.java:204) at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:155) ... 54 more- changed the title
[-]Update dependency com.puppycrawl.tools:checkstyle to v10.22.0[/-][+]Compatibility with Checkstyle 10.22[/+]on Apr 1, 2025 - added a commit that references this issue
on Apr 27, 2025 We can't upgrade to Checkstyle 10 as it requires Java 11 and Spring Java Format needs to support projects with a Java 8 baseline.
Spring framework upgraded to Java 17, we still need to keep compatible with Java 8?
Micrometer and Reactor are still Java 8 based.
Update dependency com.puppycrawl.tools:checkstyle to 10.22.0
This is in particular needed because of a breaking change in version 10.22.0:
See https://checkstyle.org/releasenotes.html#Release_10.22.0
So it is no longer possible to simply override the version of com.puppycrawl.tools:checkstyle in other projects like this: