Releases: diffplug/spotless
Releases · diffplug/spotless
Maven Plugin v3.7.0
Lib v4.7.0
Added
- Add support for AsciiDoc formatting via
adocfmt. (#2960) flexmarkstep now supports arbitrary formatter options via aformatterOptionsmap. (#2968)
Fixed
FenceStep.preserveWithinnow forwards lints from nested steps while still suppressing lints inside preserved blocks. (#2962)- Support
ktfmt0.63 and use its new builder API for formatting options to better avoid future breaking changes. - Parse standard git year output in LicenseHeaderStep. (#2940)
- Fix
StringIndexOutOfBoundsExceptionin scenarios where copyright year is surrounded by whitespace. (#2973)
Changes
- Bump default
greclipseversion to latest4.35->4.39. (#2924)
Gradle Plugin v8.7.0
Added
- Add support for AsciiDoc formatting via
adocfmt. (#2960) flexmark()step now supports arbitrary formatter options via theformatterOptionsmap. (#2968)
Fixed
toggleOffOnno longer disables lint-only steps such asforbidWildcardImports. (#2962)- Prevent build caches from interfering when executing under the
-PspotlessIdeHookmode. (#2365) - Parse standard git year output in LicenseHeaderStep. (#2940)
- Fix
StringIndexOutOfBoundsExceptionin scenarios where copyright year is surrounded by whitespace. (#2973)
Changes
- Bump default
greclipseversion to latest4.35->4.39. (#2924)
Maven Plugin v3.6.0
Added
- Add
<cacheDirectory>to<eclipse>,<greclipse>, and<eclipseCdt>for the Equo/Solstice P2 cache. (#2944) EclipseJdtFormtterStepnow can conditionally set compiler source/compliance options. Allows for better parsing of AST Node for newer language features and more correct sorting; e.g. records or seal classes. (#2942)
Fixed
<versionCatalog>no longer splits long inline tables across multiple lines — Gradle's TOML 1.0 parser cannot read multi-line inline tables. ThemaxLineLengthoption has been removed. (#2948)spotless:applyno longer aborts on the first file with lints; it now formats all files and reports a single aggregated lint failure across every file, matching the Gradle plugin's behavior. (#2937)<greclipse>and<eclipseCdt>now default P2 data to the Maven local repository. (#2944)forbidWildcardImportsandforbidModuleImportsnow detect imports that have leading whitespace (indentation/tabs). (#2939)
Changes
- Improved formatting performance by eliminating redundant per-step line-ending normalization in the core formatter loop. (#2934)
Lib v4.6.2
Fixed
P2Provisionernow passes cache directory overrides directly to Solstice. (#2944)forbidWildcardImportsandforbidModuleImportsnow detect imports that have leading whitespace (indentation/tabs). (#2939)versionCatalogstep no longer splits long inline tables across multiple lines — Gradle's TOML 1.0 parser cannot read multi-line inline tables. ThemaxLineLengthoption has been removed. (#2948)
Changes
EclipseJdtFormtterStepnow can conditionally set compiler source/compliance options. Allows for better parsing of AST Node for newer language features and more correct sorting; e.g. records or seal classes. (#2942)Formatterno longer recomputes line-ending normalization (LineEnding.toUnix) a second time for every formatter step that changes content, removing redundant O(n) work from the core formatting loop. (#2934)- expandWildcardImports support pom type dependency. (#2839)
Gradle Plugin v8.6.0
Added
- Add
cacheDirectory(...)toeclipse(),eclipseCdt(), andgreclipse(); the default P2 cache is$GRADLE_USER_HOME/caches/p2-data. (#2944)
Fixed
forbidWildcardImportsandforbidModuleImportsnow detect imports that have leading whitespace (indentation/tabs). (#2939)versionCatalog()no longer splits long inline tables across multiple lines — Gradle's TOML 1.0 parser cannot read multi-line inline tables. ThemaxLineLengthoption has been removed. (#2948)EclipseJdtFormtterStepnow can conditionally set compiler source/compliance options. Allows for better parsing of AST Node for newer language features and more correct sorting; e.g. records or seal classes. (#2942)
Changes
- Improved formatting performance by eliminating redundant per-step line-ending normalization in the core formatter loop. (#2934)
Maven Plugin v3.5.1
Fixed
<licenseHeader>with<yearMode>SET_FROM_GIT</yearMode>no longer runsgit logthrough a shell, eliminating a shell-injection vector when formatting files whose names contain shell metacharacters.- Bump transitive
plexus-utils4.0.2->4.0.3to address CVE-2025-67030. (#2919)
Lib v4.6.1
Fixed
LicenseHeaderStepinSET_FROM_GITyear mode no longer invokesgit logthroughbash -c/cmd /c, eliminating a shell-injection vector when processing repositories that contain files whose names include shell metacharacters.
Gradle Plugin v8.5.1
Fixed
licenseHeaderwithsetLicenseHeaderYearsFromGitHistory()no longer runsgit logthrough a shell, eliminating a shell-injection vector when formatting files whose names contain shell metacharacters.
Maven Plugin v3.5.0
Added
<scalafmt>now reads the version from theversionfield in the scalafmt config file when no<version>is explicitly set, falling back to the built-in default only if neither is available. (#2922)- Add
<toml>format type with<versionCatalog>step for formatting and sorting Gradle version catalog files. (#2916) - Add
<javaparserVersion>option to<cleanthat>, allowing users to override the JavaParser version pulled in transitively by Cleanthat. (#2903) - Add a
expandWildcardImportsAPI for java (#2829)
Fixed
- Preserve case of JDBI named bind params that collide with SQL keywords (e.g.
:limit,:offset) in the DBeaver SQL formatter. (#2899) - The
-Dspotless.ratchetFrom=...user property now takes priority over<ratchetFrom>configured in the plugin or in individual formatters, instead of being overridden by them. (#2896, fixes #2842) - Fix non-idempotent formatting when
importOrder()is combined withgreclipse(): a single catch-all group no longer strips blank lines thatgreclipse()independently inserted between import groups. (#2914)
Changes
- Fix
expandWildcardImportsfailing on JDK XML types such asorg.xml.sax.InputSource. (#2921) - Use Eclipse JDT's collator-based comparison when sorting Java members to better match Eclipse save actions. (#2920)
- Bump default
cleanthatversion2.24->2.25. (#2903) - Bump default
eclipse-jdtversion from4.35to4.39. (#2912)