We adhere to the keepachangelog format (starting after version 1.27.0).
- Add the ability to specify a wildcard version (
*) for external formatter executables. (#2757)
- [fix]
NPEdue to workingTreeIterator being null for git ignored files. #911 (#2771) - Prevent race conditions when multiple npm-based formatters launch the server process simultaneously while sharing the same
node_modulesdirectory. (#2786)
- Bump default
ktfmtversion to latest0.59->0.61. (2804) - Bump default
ktlintversion to latest1.7.1->1.8.0. (2763) - Bump default
gherkin-utilsversion to latest9.2.0->10.0.0. (#2619) - Bump default
jacksonversion to latest2.20.1->2.21.0. (#2819)
- Bump default
ktfmtversion to latest0.58->0.59. (#2681 - Bump default
jacksonversion to latest2.20.0->2.20.1. (#2730) - Bump default
cleanthatversion to latest2.23->2.24. (#2620) - POTENTIALLY BREAKING Removed support for
ktlintversions below 1.0. (#2711)
- Use absolute path in the git pre push hook
- palantirJavaFormat is no longer arbitrarily set to outdated versions on Java 17, latest available version is always used (#2686 fixes #2685)
<forbidModuleImports>API for java (#2679)
- BREAKING Bump the required Java to
17. (#2375, #2540) - BREAKING Renamed
removeWildcardImportstoforbidWildcardImports. (#2633) - BREAKING
spotless:install-git-pre-push-hooktask is now always installed in the root.git/hooksdirectory by resolving the top-level project base directory. (#2570) - Bump JGit from
6.10.1to7.3.0(#2257)- Adds support for worktrees (fixes #1765)
- Bump default
google-java-formatversion to latest1.24.0->1.28.0. (#2345) - Bump default
gsonversion to latest2.13.1->2.13.2. (#2615) - Bump default
jacksonversion to latest2.19.2->2.20.0. (#2606) - Bump default
ktfmtversion to latest0.53->0.58(#2613)- BREAKING use
TrailingCommaManagementStrategyenum instead ofmanageTrailingCommasboolean configuration option
- BREAKING use
- Bump default
ktlintversion to latest1.5.0->1.7.1. (#2555) - Bump default
palantir-java-formatversion to latest2.57.0->2.71.0.
- Fix
spaceBeforeSeparatorin Jackson formatter. (#2103)
<lintSupressions>API (#2309)- There is now a
forbidRegex(String name, String searchRegex, String lintDetail)which throws a lint anytime the regex matches. (#2633)
spotless:install-git-pre-push-hookdidn't work on windows, now fixed. (#2562)
- Allow specifying path to Biome JSON config file directly in
biomestep. Requires biome 2.x. (#2548) spotless:install-git-pre-push-hookgoal, which installs a Gitpre-pushhook to runspotless:checkandspotless:apply. (#2553)
- Bump default
gsonversion to latest2.11.0->2.13.1. (#2414) - Bump default
jacksonversion to latest2.18.1->2.19.2. (#2558) - Bump default
gherkin-utilsversion to latest9.0.0->9.2.0. (#2408) - Bump default
cleanthatversion to latest2.22->2.23. (#2556)
- Support for
idea(#2020, #2535) - Add support for removing wildcard imports via
removeWildcardImportsstep. (#2517)
SortPomdisable expandEmptyElements, to avoid empty body warnings. (#2520)- Fix biome formatter for new major release 2.x of biome (#2537)
- Make sure npm-based formatters use the correct
node_modulesdirectory when running in parallel. (#2542)
- Bump internal dependencies for npm-based formatters (#2542)
- scalafmt: enforce version consistency between the version configured in Spotless and the version declared in Scalafmt config file (#2460)
- Bump default
eclipseversion to latest4.34->4.35. (#2458) - Bump default
greclipseversion to latest4.32->4.35. (#2458) - pgp key had expired, this and future releases will be signed by new key (details)
- Use palantir-java-format 2.57.0 on Java 21. (#2447)
- Re-try
npm installwith--prefer-onlineafterERESOLVEerror. (#2448) - Allow multiple npm-based formatters having the same module dependencies, to share a
node_modulesdir without race conditions. #2462)
- Eclipse-based tasks can now handle parallel configuration (#2389)
- Deployment was missing part of the CDT formatter, now fixed. (#2384)
- The long
2.44.0.BETAXperiod is finally over (sorry, there was a problem in Gradle land). - Spotless now supports linting in addition to formatting.
- help wanted: maven api to suppress lints
- Bump default
ktlintversion to latest1.3.0->1.4.0. (#2314) - Bump default
jacksonversion to latest2.18.0->2.18.1. (#2319) - Bump default
ktfmtversion to latest0.52->0.53. (#2320) - Bump default
ktlintversion to latest1.4.0->1.5.0. (#2354) - Bump minimum
eclipse-cdtversion to11.0(removed support for10.7). (#2373) - Bump default
eclipseversion to latest4.32->4.34. (#2381)
- You can now use
removeUnusedImportsandgoogleJavaFormatat the same time again. (fixes #2159) - The default list of type annotations used by
formatAnnotationsnow includes Jakarta Validation'sValidand constraints validations (fixes #2334)
- Support for line ending policy
PRESERVEwhich just takes the first line ending of every given file as setting (no matter if\n,\r\nor\r) (#2304)
ktlintsteps now read from thestringinstead of thefileso they don't clobber earlier steps. (fixes #1599)
- Leverage local repository for Equo P2 cache. (#2238)
- Add explicit support for CSS via biome. Formatting CSS via biome was already supported as a general formatting step. Biome supports formatting CSS as of 1.8.0 (experimental, opt-in) and 1.9.0 (stable). (#2259)
- Bump default
google-java-formatversion to latest1.23.0->1.24.0. (#2294) - Bump default
jacksonversion to latest2.17.2->2.18.0. (#2279) - Bump default
cleanthatversion to latest2.21->2.22. (#2296)
- Java import order, ignore duplicate group entries. (#2293)
- Support toning down sortPom logging. (#2185)
- Bump default
ktlintversion to latest1.2.1->1.3.0. (#2165) - Bump default
ktfmtversion to latest0.49->0.52. (#2172, #2231) - Rename property
ktfmtoptionremoveUnusedImport->removeUnusedImportsto matchktfmt. (#2172) - Bump default
eclipseversion to latest4.29->4.32. (#2179) - Bump default
greclipseversion to latest4.29->4.32. (#2179, #2190) - Bump default
cdtversion to latest11.3->11.6. (#2179) - Bump default
gsonversion to latest2.10.1->2.11.0. (#2128) - Bump default
jacksonversion to latest2.17.1->2.17.2. (#2195) - Bump default
cleanthatversion to latest2.20->2.21. (#2210) - Bump default
google-java-formatversion to latest1.22.0->1.23.0. (#2212)
- Fix compatibility issue introduced by
ktfmt0.51. (#2172)
- Add option
manageTrailingCommastoktfmt. (#2177)
- Respect
.editorconfigsettings for formatting shell viashfmt(#2031) - Skip execution in M2E (incremental) builds by default (#1814, #2037)
- Check if ktlint_code_style is set in .editorconfig before overriding it (#2143)
- Default EditorConfig path to ".editorconfig" (#2143)
- Ignore system git config when running tests (#1990)
- Correctly provide EditorConfig property types for Ktlint (#2052)
- Made ShadowCopy (
npmInstallCache) more robust by re-creating the cache dir if it goes missing (#1984,2096) - scalafmt.conf fileOverride section now works correctly (#1854)
- Fix stdin pipe is being closed exception on Windows for large .proto files (#2147)
- Reworked ShadowCopy (
npmInstallCache) to use atomic filesystem operations, resolving several race conditions that could arise (#2151)
- Bump default
cleanthatversion to latest2.16->2.20. (#1725) - Bump default
gherkin-utilsversion to latest8.0.2->9.0.0. (#1703) - Bump default
google-java-formatversion to latest1.19.2->1.22.0. (#2129) - Bump default
jacksonversion to latest2.14.2->2.17.1. (#1685) - Bump default
ktfmtversion to latest0.46->0.49. (#2045, #2127) - Bump default
ktlintversion to latest1.1.1->1.2.1. (#2057) - Bump default
scalafmtversion to latest3.7.3->3.8.1. (#1730) - Bump default
shfmtversion to latest3.7.0->3.8.0. (#2050) - Bump default
sortpomversion to latest3.2.1->4.0.0. (#2049, #2078, #2115) - Bump default
zjsonpatchversion to latest0.4.14->0.4.16. (#1969)
- BREAKING Fully removed
Rome, useBiomeinstead. (#2119)
- Support for formatting shell scripts via shfmt. (#1998)
- Support for
gofmt(#2001) - Support for formatting Java Docs for the Palantir formatter (#2009)
- M2E support: Emit file specific errors during incremental build. (#1960)
- Fix empty files with biome >= 1.5.0 when formatting files that are in the ignore list of the biome configuration file. (#1989 fixes #1987)
- Use palantir-java-format 2.39.0 on Java 21. (#1948)
- Bump default
ktlintversion to latest1.0.1->1.1.1. (#1973) - Bump default
googleJavaFormatversion to latest1.18.1->1.19.2. (#1971) - Bump default
diktatversion to latest1.2.5->2.0.0. (#1972)
- Revert #1846 from 2.41.0 which causes the plugin to format generated sources in the
targetdirectory. (#1928) - Eclipse-based steps which contained any jars with a
+in their path were broken, now fixed. (#1860)
- Bump default
palantir-java-formatversion to latest2.28.0->2.38.0on Java 21. (#1920) - Bump default
googleJavaFormatversion to latest1.17.0->1.18.1. (#1920) - Bump default
ktfmtversion to latest0.44->0.46. (#1927) - Bump default
eclipseversion to latest4.27->4.29. (#1939) - Bump default
greclipseversion to latest4.28->4.29. (#1939) - Bump default
cdtversion to latest11.1->11.3. (#1939)
CompileSourceRoots and TestCompileSourceRoots are now respected as default includes. These properties are commonly set when adding extra source directories.(#1846)- Reverted in the next release (
2.41.1) due to backward compatibility problems, see #1914.
- Reverted in the next release (
- Support custom rule sets for Ktlint. (#1896)
- Fix crash when build dir is a softlink to another directory. (#1859)
- Fix Eclipse JDT on some settings files. (#1864 fixes #1638)
- Bump default
ktlintversion to latest1.0.0->1.0.1. (#1855) - Add a Step to remove semicolons from Groovy files. (#1881)
- Add
-DspotlessIdeHookthat provides the ability to apply Spotless exclusively to a specified file. It accepts the absolute path of the file. (#1782)- BETA, subject to change until we have proven compatibility with some IDE plugins.
- Added support for
google-java-format'sskip-javadoc-formattingoption (#1793) - Added support for biome. The Rome project was renamed to Biome.
The configuration is still the same, but you should switch to the new
<biome>tag and adjust the version accordingly. (#1804). - Support configuration of mirrors for P2 repositories (#1697):
Mirrors are selected by prefix match, for example
<eclipse> <p2Mirrors> <p2Mirror> <prefix>https://download.eclipse.org/</prefix> <url>https://some.internal.mirror/eclipse</url> </p2Mirror> </p2Mirrors> </eclipse>https://download.eclipse.org/eclipse/updates/4.26/will be redirected tohttps://some.internal.mirror/eclipse/eclipse/updates/4.26/. The same configuration exists for<greclipse>and<eclipseCdt>.
- Fixed support for plugins when using Prettier version
3.0.0and newer. (#1802)
- Bump default
flexmarkversion to latest0.64.0->0.64.8. (#1801) - Bump default
ktlintversion to latest0.50.0->1.0.0. (#1808) - POSSIBLY BREAKING the default line endings are now
GIT_ATTRIBUTES_FAST_ALLSAMEinstead ofGIT_ATTRIBUTES. (#1838)- If all the files within a format have the same line endings, then there is no change in behavior.
- Fixes large performance regression. (#1527)
- Add a
jsonPatchstep tojsonformatter configurations. This allows patching of JSON documents using JSON Patches. (#1753) - Support GJF own import order. (#1780)
- Add support for
prettierversion3.0.0and newer. (#1760, #1751) - Fix npm install calls when npm cache is not up-to-date. (#1760, #1750)
- Bump default
eslintversion to latest8.31.0->8.45.0(#1761) - Bump default
prettierversion to latest (v2)2.8.1->2.8.8. (#1760) - Bump default
greclipseversion to latest4.27->4.28. (#1775)
- Support pass skip (
-Dspotless.skip=true) from command-line. (#1729)
- Update documented default
semanticSorttofalse. (#1728)
- Bump default
cleanthatversion to latest2.13->2.17. (#1734) - Bump default
ktlintversion to latest0.49.1->0.50.0. (#1741)- Dropped support for
ktlint 0.47.xfollowing our policy of supporting two breaking changes at a time. - Dropped support for deprecated
useExperimentalparameter in favor of thektlint_experimentalproperty.
- Dropped support for
- Support Rome as a formatter for JavaScript and TypeScript code. Adds a new
romestep tojavascriptandtypescriptformatter configurations. (#1663) - Add semantics-aware Java import ordering (i.e. sort by package, then class, then member). (#522)
palantirstep now accepts astyleparameter, which is documentation had already claimed to do. (#1694)- Fixed a regression which changed the import sorting order in
googleJavaFormatintroduced in2.36.0. (#1680) - Equo-based formatters now work on platforms unsupported by Eclipse such as PowerPC (fixes durian-swt#20)
- When P2 download fails, indicate the responsible formatter. (#1698)
- Equo-based formatters now download metadata to
~/.m2/repository/dev/equo/p2-datarather than~/.equo, and for CI machines without a home directory the p2 data goes to$GRADLE_USER_HOME/caches/p2-data. (#1714) - Bump default
googleJavaFormatversion to latest1.16.0->1.17.0. (#1710) - Bump default
ktfmtversion to latest0.43->0.44. (#1691) - Bump default
ktlintversion to latest0.48.2->0.49.1. (#1696)- Dropped support for
ktlint 0.46.xfollowing our policy of supporting two breaking changes at a time.
- Dropped support for
- Bump default
sortpomversion to latest3.0.0->3.2.1. (#1675)
removeUnusedImportcan be configured to rely oncleanthat-javaparser-unnecessaryimport. Default remainsgoogle-java-format. (#1589)- The
styleoption in Palantir Java Format (#1654). - Added formatter for Gherkin feature files (#1649).
- Fix non deterministic computation of cache fingerprint when using multiple formatters. (#1643 fixes #1642)
- POTENTIALLY BREAKING Drop support for
googleJavaFormatversions <1.8. (#1630) - Bump default
cleanthatversion to latest2.6->2.13. (#1589 and #1661) - Bump default
diktatversion1.2.4.2->1.2.5. (#1631) - Bump default
flexmarkversion0.62.2->0.64.0. (#1302) - Bump default
googleJavaFormatversion1.15.0->1.16.0. (#1630) - Bump default
scalafmtversion3.7.1->3.7.3. (#1584) - Bump default Eclipse formatters for the 2023-03 release. (#1662)
- JDT and GrEclipse
4.26->4.27- Improve GrEclipse error reporting. (#1660)
- CDT
11.0->11.1
- JDT and GrEclipse
licenseHeaderdefault pattern for Java files is updated to(package|import|public|class|module). (#1614)
- Enable incremental up-to-date checking by default. (#1621)
- All Eclipse formatters are now based on Equo Solstice OSGi and p2 shim. (#1524)
- Eclipse JDT bumped default to
4.26from4.21, oldest supported is4.9.- We now recommend dropping the last
.0, e.g.4.26instead of4.26.0, you'll get warnings to help you switch.
- We now recommend dropping the last
- Eclipse Groovy bumped default to
4.26from4.21, oldest supported is4.18. - Eclipse CDT bumped default to
11.0from4.21, oldest supported is10.6. - Eclipse WTP is still WIP at #1622.
- Eclipse JDT bumped default to
cleanthataddedincludeDraftoption, to include draft mutators from composite mutators. (#1574)npm-based formatters (prettier,tsfmtandeslint) now support caching ofnode_modulesdirectory. To enable it, provide the<npmInstallCache>option. (#1590)
<json><jackson>can now handleArrayas a root element. (#1585)- Reduce logging-noise created by
npm-based formatters (#1590 fixes #1582)
- CleanThat Java Refactorer. (#1560)
- Allow multiple instances of the same npm-based formatter to be used simultaneously. E.g. use prettier for typescript
and Java (using the community prettier-plugin-java) without messing up their respective
node_moduledependencies. (#1565) ktfmtdefault style uses correct continuation indent. (#1562)
- Bump default
ktfmtversion to latest0.42->0.43(#1561) - Bump default
jacksonversion to latest2.14.1->2.14.2(#1536)
- A synthesis log with the number of considered files is added after each formatter execution (#1507)
- Respect
sourceDirectoryandtestSourceDirectoryPOM configurations for Java formatters (#1553) - POTENTIALLY BREAKING
sortByKeysfor JSON formatting now takes into account objects inside arrays (#1546) - Any commit of the Spotless Maven plugin now available via JitPack (#1547)
- Prettier will now suggest to install plugins if a parser cannot be inferred from the file extension (#1511)
- Jackson (
jsonandyaml) has newspaceBeforeSeparatoroption- POTENTIALLY BREAKING
spaceBeforeSeparatoris defaulted to false while the formatter was behaving with<spaceBeforeSeparator>true<spaceBeforeSeparator/>
- POTENTIALLY BREAKING
- Introduce
<json><jackson/></json>(#1492)- POTENTIALLY BREAKING
JacksonYamlis now configured with aMap<String, Boolean>to configure features
- POTENTIALLY BREAKING
- Allow to specify node executable for node-based formatters using
nodeExecutableparameter (#1500)
- The default list of type annotations used by
formatAnnotationshas had 8 more annotations from the Checker Framework added #1494 - POTENTIALLY BREAKING Generate the correct qualifiedRuleId for Ktlint 0.48.x #1495
- POTENTIALLY BREAKING Bump minimum JRE from 8 to 11 (#1514 part 1 of #1337)
- You can bump your build JRE without bumping your requirements (docs).
- Spotless' custom build was replaced by
maven-plugin-development. (#1496 fixes #554) - POTENTIALLY BREAKING Removed support for KtLint 0.3x and 0.45.2 (#1475)
KtLintdoes not maintain a stable API - before this PR, we supported every breaking change in the API since 2019.- From now on, we will support no more than 2 breaking changes at a time.
npm-based formattersESLint,prettierandtsfmtdelay theirnpm installcall until the formatters are first used. (#1522- Bump default
ktlintversion to latest0.48.1->0.48.2(#1529) - Bump default
scalafmtversion to latest3.6.1->3.7.1(#1529)
- Add option
editorConfigFileforktLint#142- POTENTIALLY BREAKING
ktlintstep now modifies license headers. Make sure to putlicenseHeaderafterktlint.
- POTENTIALLY BREAKING
- Added
skipLinesMatchingoption tolicenseHeaderto support formats where license header cannot be immediately added to the top of the file (e.g. xml, sh). (#1441) - Add JSON support (#1446)
- Add YAML support through Jackson (#1478)
- Added support for npm-based ESLint-formatter for javascript and typescript (#1453)
- Better suggested messages when user's default is set by JVM limitation. (#995)
- Support
ktlint0.48+ new rule disabling syntax (#1456) fixes (#1444) - Fix subgroups leading catch all matcher.
- Bump default
ktlintversion to latest0.47.1->0.48.1(#1456) - Reduce spurious invalidations of the up-to-date index file (#1461)
- Bump default version for
prettierfrom2.0.5to2.8.1(#1453)
- Bump default
ktlintversion to latest0.47.1->0.48.0(#1432) - Bump default
ktfmtversion to latest0.41->0.42(#1421)
importOrdernow support groups of imports without blank lines (#1401)
- Don't treat
@Valueas a type annotation #1367 - Support
ktlint_disabled_rulesinktlint0.47.x #1378 - Share git repositories across projects when using ratchet (#1426)
- Bump default
ktfmtversion to latest0.40->0.41(#1340) - Bump default
scalafmtversion to latest3.5.9->3.6.1(#1373) - Bump default
diktatversion to latest1.2.3->1.2.4.2(#1393) - Bump default
palantir-java-formatversion to latest2.10->2.28(#1393)
replaceandreplaceRegexsteps now allow you to replace something with an empty string, previously this would generate a null pointer exception. (fixes #1359)
formatAnnotationsstep to correct formatting of Java type annotations. It puts type annotations on the same line as the type that they qualify. Run it after a Java formatting step, such asgoogleJavaFormat. (#1275)
- Bump default
ktfmtversion to latest0.39->0.40(#1312) - Bump default
ktlintversion to latest0.46.1->0.47.1(#1303)- Also restored support for older versions of ktlint back to
0.31.0
- Also restored support for older versions of ktlint back to
scalafmtintegration now has a configuration optionmajorScalaVersionthat allows you to configure the Scala version that gets resolved from the Maven artifact (#1283)
- Add the
ktlintrule in error messages whenktlintfails to apply a fix (#1279) - Bump default
scalafmtto latest3.0.8->3.5.9(removed support for pre-3.0.0) (#1283)
- Bump default
diktatversion to latest1.2.1->1.2.3(#1266)
- Clang and Black no longer break the build when the binary is unavailable, if they will not be run during that build (#1257).
- License header support for Kotlin files without
packageor@filebut do at least haveimport(#1263).
- Bump default
ktlintversion to latest0.45.2->0.46.1(#1239)- Minimum supported version also bumped to
0.46.0(we have abandoned strong backward compatibility forktlint, from here on out Spotless will only support the most-recent breaking change).
- Minimum supported version also bumped to
- Bump default
diktatversion to latest1.1.0->1.2.1(#1246)- Minimum supported version also bumped to
1.2.1(diktat is based on ktlint and has the same backward compatibility issues).
- Minimum supported version also bumped to
- Bump default
ktfmtversion to latest0.37->0.39(#1240)
PalantirJavaFormatStepno longer needs the--add-exportscalls inMAVEN_OPTSor.mvn/jvm.config. (#1233)
- (Second try)
googleJavaFormatandremoveUnusedImportsworks on JDK16+ without jvm args workaround. (#1228)- If you have a bunch of
--add-exportscalls inMAVEN_OPTSor.mvn/jvm.config, you should be able to remove them. (fixes #834)
- If you have a bunch of
googleJavaFormatandremoveUnusedImportsworks on JDK16+ without jvm args workaround. (#1224)- If you have a bunch of
--add-exportscalls inMAVEN_OPTSor.mvn/jvm.config, you should be able to remove them. (fixes #834)
- If you have a bunch of
- Update the
blackversion regex to fix19.10b0and earlier. (fixes #1195, regression introduced in2.22.2)
- Bump default
ktfmtversion to latest0.36->0.37. (#1200)
- Bump default
diktatversion to latest1.0.1->1.1.0. (#1190)
- Bump default
ktfmtversion to latest0.35->0.36. (#1183) - Bump default
google-java-formatversion to latest1.13.0->1.15.0.This means it is no longer necessary to use the--add-exportsworkaround (fixes #834).--add-exportsworkaround is still needed.
- Fixed support for Python Black's new version reporting. (#1170)
- Error messages for unexpected file encoding now works on Java 8. (fixes #1081)
- Bump default
blackversion to latest19.10b0->22.3.0. (#1170) - Bump default
ktfmtversion to latest0.34->0.35. (#1159) - Bump default
ktlintversion to latest0.43.2->0.45.2. (#1177)
- Git user config and system config also included for defaultEndings configuration. (#540)
- Added support for setting custom parameters for Kotlin ktfmt in Maven plugin. (#1145)
- Magic value 'NONE' for disabling ratchet functionality (#1134)
- Use SLF4J for logging (#1116)
- Bump default ktfmt
0.30->0.31(#1118).
- Add full support for git worktrees (#1119).
- Bump default versions of formatters (#1095).
- google-java-format
1.12.0->1.13.0 - ktfmt
0.29->0.30
- google-java-format
- Added support for git property
core.autocrlf(#540)
- Added support for the palantir-java-format Java formatter (#1083).
- Enabling the upToDateChecking with the plugin configured inside pluginManagement, with an additional dependency and running under Maven 3.6.3 leads to a java.io.NotSerializableException. (#1074).
- Update IndentStep to allow leading space on multiline comments (#1072).
- Support custom index files for incremental up-to-date checking (#1055).
- Remove Java files from default Maven Groovy formatting (#1051).
- Before this release, the default target of groovy was
src/main/groovy/**/*.groovysrc/test/groovy/**/*.groovysrc/main/java/**/*.javasrc/test/java/**/*.java
- This release removes the
.javaincludes.
- Before this release, the default target of groovy was
- Bumped default DiKTat from
0.4.0to1.0.1. This is a breaking change for DiKTat users on the default version, because some rules were renamed/changed. Check DiKTat changelog for details.
ratchetFromis now faster (#1038).
- Bumped default ktlint from
0.43.0to0.43.2.
- Bump jgit version (#992).
- jgit
5.10.0.202012080955-r->5.13.0.202109080827-r
- jgit
- Bump default formatter versions (#989)
- google-java-format
1.11.0->1.12.0 - ktlint
0.42.1->0.43.0 - ktfmt
0.27->0.29 - scalafmt
3.0.0->3.0.8
- google-java-format
- Added support and bump Eclipse formatter default versions to
4.21foreclipse-groovy. Change is only applied for JVM 11+. - Added support for ktlint's FilenameRule (#974).
- Revert change from 2.17.2 regarding skip bug because fixing the skip bug caused inconsistent behavior between
check.skipandapply.skip. - skip bug if ratchetFrom is specified, the build will still fail in if no Git repository is found, even if
skipis true (new fix).
- Temporary workspace deletion for Eclipse based formatters on JVM shutdown (#967). Change is only applied for Eclipse versions using JVM 11+, no back-port to older versions is planned.
- skip bug if ratchetFrom is specified, the build will still fail in if no Git repository is found, even if
skipis true.
- module-info formatting in
eclipse-jdtversions4.20and4.21. Note that the problem also affects older versions. - Added workaround to support projects using git worktrees (#965)
- Added
wildcardsLastoption for JavaimportOrder(#956)
- Added support for JBDI bind list params in sql formatter (#955)
- Added support for custom JSR223 formatters (#945)
- Added support for formatting and sorting Maven POMs (#946)
- Added support for calling local binary formatters (#949)
- Added support and bump Eclipse formatter default versions to
4.21foreclipse-cdt,eclipse-jdt,eclipse-wtp. Change is only applied for JVM 11+. - Added
groupArtifactoption forgoogle-java-format(#944)
- Added support and bump Eclipse formatter default versions for JVM 11+. For older JVMs the previous defaults remain.
eclipse-cdtfrom4.16to4.20eclipse-groovyfrom4.19to4.20eclipse-jdtfrom4.19to4.20eclipse-wtpfrom4.18to4.20
- Added support for
google-java-format'sskip-reflowing-long-stringsoption (#929)
- Added support for scalafmt 3.0.0 and bump default scalafmt version to
3.0.0(#913). - Bump default versions (#915)
ktfmtfrom0.24to0.27ktlintfrom0.35.0to0.42.1google-java-formatfrom1.10.0to1.11.0
- Improved SQL formatting with respect to comments
- Fixed IndexOutOfBoundsException in parallel execution of
eclipse-groovyformatter (#877)
- Added support for
eclipse-cdtat4.19.0. Note that version requires Java 11 or higher. - Added support for
eclipse-groovyat4.18.0and4.19.0. - Added support for
eclipse-wtpat4.19.0. Note that version requires Java 11 or higher.
- Bump
eclipse-groovydefault version from4.17.0to4.19.0.
- Node is re-installed if some other build step removed it (#863)
- Update ktfmt from 0.21 to 0.24
- The
<url>field in the Maven POM is now set correctly (#798)
- Explicitly separate target file from git arguments when parsing year for license header to prevent command from failing on argument-like paths (#847)
- LicenseHeaderStep treats address as copyright year (#716)
- Fix license header bug for years in range (#840).
- Added support for
eclipse-jdtat4.19.0.
- Bump
eclipse-jdtdefault version from4.18.0to4.19.0. - Bump
google-java-formatdefault version from1.9to1.10.0. - Expose configuration exceptions from scalafmt (#837)
- Bump ktfmt to 0.21 and add support to Google and Kotlinlang formats (#812)
- Allow licence headers to be blank (#801).
- Support for diktat (#789)
- Added ability to specify dropbox style for ktfmt
<style>DROPBOX</style>(#764) - Added support for
eclipse-cdt,eclipse-jdt, andeclipse-wtpat4.18.0.
- Bump
eclipse-jdtdefault version from4.17.0to4.18.0. - Bump
eclipse-wtpdefault version from4.17.0to4.18.0. - Bump
ktfmtdefault version from0.16to0.19(#748 and #773).
- Fixed
ratchetFromsupport for git-submodule (#746). - Fixed
ratchetFromexcess memory consumption (#735). ktfmtv0.19+ with dropbox-style works again (#765).prettierno longer throws errors on empty files (#751).- Fixed error when running on root of windows mountpoint (#760).
- Fix broken test for spotlessFiles parameter on windows (#737).
- Fixed a bug which occurred if the root directory of the project was also the filesystem root (#732).
- Upgraded org.codehaus.plexus:plexus-utils to its latest version (3.3.0) to improve directory scanning time (#729).
- Whether this helps with the directory scanning time is unconfirmed, please report your experience in the issue above.
- Added support to npm-based steps for picking up
.npmrcfiles (#727)
- Fixed bug in import order which woudld cause trailing empty strings to get dropped (731)
- e.g.
<importorder><order>java,javafx,com.mycompany,</order></importorder>
- e.g.
- Bump JGit from
5.8.0to5.9.0to improve performance (#726)
- Added support for eclipse-cdt 4.14.0, 4.16.0 and 4.17.0 (#722).
- Added support for eclipse-groovy 4.14.0, 4.15.0, 4.16.0 and 4.17.0 (#722).
- Added support for eclipse-jdt 4.17.0 (#722).
- Added support for eclipse-wtp 4.14.0, 4.15.0, 4.16.0 and 4.17.0 (#722).
- Updated default eclipse-cdt from 4.13.0 to 4.16.0 (#722). Note that version 4.17.0 is supported, but requires Java 11 or higher.
- Updated default eclipse-groovy from 4.13.0 to 4.17.0 (#722).
- Updated default eclipse-jdt from 4.16.0 to 4.17.0 (#722).
- Updated default eclipse-wtp from 4.13.0 to 4.17.0 (#722).
- Improve speed by ~4x when using
<ratchetFrom>(#701).
- Don't assume that file content passed into Prettier is at least 50 characters (#699).
- Improved JRE parsing to handle strings like
16-loom(fixes #693). - Added support for groovy formatting (#697)
- New option
<toggleOffOn />which allows the tagsspotless:offandspotless:onto protect sections of code from the rest of the formatters (#691).
- When applying license headers for the first time, we are now more lenient about parsing existing years from the header (#690).
<googleJavaFormat>default version is now1.9on JDK 11+, while continuing to be1.7on earlier JDKs. This is especially helpful to<removeUnusedImports />, since it always uses the default version of GJF (fixes #681).
- Added support for eclipse-jdt 4.14.0, 4.15.0 and 4.16.0 (#678).
- Updated default eclipse-jdt from 4.13.0 to 4.16.0 (#678).
<ktlint>is now more robust when parsing version string for version-dependent implementation details, fixes #668.
- Bump default ktfmt from 0.13 to 0.16 (#642).
<importOrder />was broken (fixes #663).<ratchetFrom>was broken when set at global level (fixes #664).
- Git-native handling of line endings was broken, now fixed (#639).
- You can now ratchet a project's style by limiting Spotless only to files which have changed since a given git reference, e.g.
ratchetFrom 'origin/main'. (#590) - Huge speed improvement for multi-module projects thanks to improved cross-project classloader caching (#571, fixes #559).
- If you specify
-DspotlessSetLicenseHeaderYearsFromGitHistory=true, Spotless will perform an expensive search through git history to determine the oldest and newest commits for each file, and uses that to determine license header years. (#626) prettierwill now autodetect the parser (and formatter) to use based on the filename, unless you override this usingconfigorconfigFilewith the optionparserorfilepath(#620).- Added ANTLR4 support (#326).
- BREAKING the default includes for
<typescript>and<cpp>were removed, and will now generate an error if an<include>is not specified. There is no well-established convention for these languages in the Maven ecosystem, and the performance of the default includes is far worse than a user-provided one. If you dislike this change, please complain in #634, it would not be a breaking change to bring the defaults back. - BREAKING inside the
<cpp>block,<eclipse>has been renamed to<eclipseCdt>to avoid any confusion with the java<eclipse>(#636). - BREAKING the long-deprecated
<xml>and<css>formats have been removed, in favor of the long-available<eclipseWtp>step which is available in every generic format (#630).- This probably doesn't affect you, but if it does, you just need to change
<xml>...into<formats><format><eclipseWtp><type>XML</type>... - In
1.15.0(released 2018-09-23), we added support forxmlandcssformats using the Eclipse WTP. - In
1.18.0(released 2019-02-11), we deprecated these, in favor of the genericeclipseWtpstep which is available for all generic formats. This allows you to have multiple XML and CSS formats, rather than just one. - And now we removed them entirely.
- This probably doesn't affect you, but if it does, you just need to change
- Nodejs-based formatters
prettierandtsfmtnow use native node instead of the J2V8 approach. (#606)- This removes the dependency to the no-longer-maintained Linux/Windows/macOs variants of J2V8.
- This enables spotless to use the latest
prettierversions (instead of being stuck at prettier version <=1.19.0) - Bumped default versions, prettier
1.16.4->2.0.5, tslint5.12.1->6.1.2
licenseHeaderis now more robust when parsing years from existing license headers. (#593)
- Shared library used by the nodejs-based steps used to be extracted into the user home directory, but now it is extracted into a temporary directory and deleted on VM shutdown. (#586)
- If you specified a config file for a formatter, it used to be needlessly copied to a randomly-named file in the build folder. This could cause performance to suffer, especially for large multi-project builds that use eclipse. (#572)
- Note: if you are extracting config files from resource jars, we still have bad performance for this case, see #559 for details.
- If the encoding was set incorrectly,
spotless:applycould clobber special characters. Spotless now prevents this, and helps to suggest the correct encoding. (#575)
- Support for google-java-format 1.8 (requires build to run on Java 11+) (#562)
- Support for ktfmt 0.13 (requires build to run on Java 11+) (#569)
mvn spotless:applyis now guaranteed to be idempotent, even if some of the formatters are not. SeePADDEDCELL.mdfor details if you're curious. (#565)- Updated a bunch of dependencies, most notably jgit
5.5.0.201909110433-r->5.7.0.202003110725-r. (#564)
- Support for prettier (#555).
- Support for tsfmt (#548).
- Eclipse-WTP formatter (web tools platform, not java) handles some character encodings incorrectly on OS with non-unicode default file encoding #545. Fixed for Eclipse-WTP formatter Eclipse version 4.13.0 (default version).
- Enable IntelliJ-compatible token
$today.yearfor specifying the year in license header files. (#542)
- Fix scala and kotlin Maven config documentation.
- Eclipse-WTP formatter (web tools platform, not java) could encounter errors in parallel multiproject builds #492. Fixed for Eclipse-WTP formatter Eclipse version 4.13.0 (default version).
- Should be no changes whatsoever! Released only for consistency with lib and plugin-gradle.
- Revert the change in console display of errors from 1.26.0 (#485) because of these problems.
- Bugfix: Fix NPE in EclipseXmlFormatterStepImpl (#489)
- Fix project URLs in poms. (#478)
- Fix
ImportSortercrashing with empty files. (#474)- Fixes #305 StringIndexOutOfBoundsException for empty Groovy file when performing importOrder
- Bugfix: CDT version
4.12.0now properly uses9.8, whereas before it used9.7. (#482) - Updated default eclipse-wtp from 4.12.0 to 4.13.0 (#482)
- Updated default eclipse-groovy from 4.12.0 to 4.13.0 (#482)
- Updated default eclipse-jdt from 4.12.0 to 4.13.0 (#482)
- Updated default eclipse-cdt from 4.12.0 to 4.13.0 (#482)
- Bump default version of KtLint from
0.34.2to0.35.0. (#473) - Several improvements to the console display of formatting errors. (#465)
- Fixed problem which could cause a stale
.jarto be published. (#471)
- KNOWN ISSUE: published jar is the same as
1.24.3, causesInvalid plugin descriptor. (#470) - Add support for ktlint
0.34+, and bump default version from0.32.0to0.34.2. (#469)
- Update jgit from
5.3.2.201906051522-rto5.5.0.201909110433-r. (#445)- Fixes #410 AccessDeniedException in MinGW/ GitBash.
- Also fixes occasional hang on NFS due to filesystem timers.
- Eclipse-based formatters used to leave temporary files around (#447). This is now fixed, but only for eclipse 4.12+, no back-port to older Eclipse formatter versions is planned. (#451)
- Bumped
scalafmtdefault version from1.1.0to2.0.1, since there are bugs in the old default (#458).
- Fixes class loading issue with Java 9+ (#426).
- Updated default eclipse-wtp from 4.8.0 to 4.12.0 (#423).
- Updated default eclipse-groovy from 4.10 to 4.12.0 (#423).
- Updated default eclipse-jdt from 4.11.0 to 4.12.0 (#423).
- Updated default eclipse-cdt from 4.11.0 to 4.12.0 (#423).
- KNOWN BUG - accidentally published CDT 9.7 rather than 9.8 fixed in 1.26.0
- Added new Maven coordinates for scalafmt 2.0.0+, maintains backwards compatability (#415)
- Fixes incorrect M2 cache directory path handling of Eclipse based formatters (#401)
- Update jgit from
4.9.0.201710071750-rto5.3.2.201906051522-rbecause Gradle project is sometimes broken byapache httpcomponentsin transitive dependency. (#407)
- Updated default ktlint from 0.21.0 to 0.32.0, and Maven coords to com.pinterest (#394)
- Updated default eclipse-cdt from 4.7.3a to 4.11.0 (#390).
- Added
-DspotlessFilesswitch to allow targeting specific files (#392)
- Fixes incorrect plugin and pom metadata in
1.21.0(#388).
- Updated default eclipse-wtp from 4.7.3b to 4.8.0 (#382).
- Updated default eclipse-groovy from 4.8.1 to 4.10.0 (#382).
- Updated default eclipse-jdt from 4.10.0 to 4.11.0 (#384).
- Updated default eclipse-wtp from 4.7.3a to 4.7.3b (#371).
- Default behavior of XML formatter changed to ignore external URIs (#369).
- WARNING RESOLVED: By default, xml formatter no longer downloads external entities. You can opt-in to resolve external entities by setting resolveExternalURI to true. However, if you do opt-in, be sure that all external entities are referenced over https and not http, or you may be vulnerable to XXE attacks.
WARNING: xml formatter in this version may be vulnerable to XXE attacks, fixed in 1.20.0 (see #358).
- Security fix: Updated groovy, c/c++, and eclipse WTP formatters so that they download their source jars securely using
httpsrather thanhttp(#360). - Updated default eclipse-jdt from 4.9.0 to 4.10.0 (#368)
- Add a skip parameter to apply mojo to enable to bypass it if desired. (#367).
WARNING: xml formatter in this version may be vulnerable to XXE attacks, fixed in 1.20.0 (see #358).
- Provided eclipse-wtp formatters as part of custom source format element. (#325). This change obsoletes the CSS and XML source elements.
- Updated default google-java-format from 1.5 to 1.7 (#335).
<importOrder><file>somefile</file></importOrder>is now lazy (#218).
WARNING: xml formatter in this version may be vulnerable to XXE attacks, fixed in 1.20.0 (see #358).
- Updated default eclipse-jdt from 4.7.3a to 4.9.0 (#316). New version addresses enum-tab formatting bug in 4.8 (#314).
WARNING: xml formatter in this version may be vulnerable to XXE attacks, fixed in 1.20.0 (see #358).
- Added support for Eclipse's CSS formatter from WTP (#311).
WARNING: xml formatter in this version may be vulnerable to XXE attacks, fixed in 1.20.0 (see #358).
- Added
xmlsupport (#140) using formatter of Eclipse WTP 3.9.5 (#241). - Added C/C++ support using formatter of Eclipse CDT 9.4.3 (#232).
- Skip
package-info.javaandmodule-info.javafiles from license header formatting. (#273) - Updated JSR305 annotation from 3.0.0 to 3.0.2 (#274)
- Migrated from FindBugs annotations 3.0.0 to SpotBugs annotations 3.1.6 (#274)
- Fix Maven version prerequisite in the generated POM (#289)
- Updated default eclipse-jdt from 4.7.2 to 4.7.3a (#263). New version fixes a bug preventing Java code formatting within JavaDoc comments (#191).
- Updated default groovy-eclipse from 4.6.3 to 4.8.0 (#244). New version allows to ignore internal formatter errors/warnings.
- Require 3.1.0+ version of Maven. (#259)
- Fixed integration with latest versions of scalafmt. (#260)
- Fixed a bug in configuration file resolution on Windows when file is denoted by a URL. (#254)
- Fixed a bug in
LicenseHeaderStepwhich caused an exception with some malformed date-aware licenses. (#222) - Added support for Kotlin and Ktlint in Maven plugin (#223).
- Updated default ktlint from 0.14.0 to 0.21.0
- Added support for multiple generic formatters in Maven plugin (#242).
- Fixed published POM to include dependency on plexus-resources (#213).
- Improved support for multi-module Maven projects (#210).
- Added generic format support for maven-plugin (#209).
- Fix build to ensure that published versions never have snapshot deps (#205).
- Maven plugin written by Konstantin Lutovich.
- Full support for the Java and Scala formatters.
- Initial release, after user feedback we will ship
1.x.